/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FormProfessor.java
 *
 * Created on 25/01/2012, 09:40:22
 */
package Formularios;

import Atributos.*;
import Metodos.*;
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Andre
 */
public class FormProfessor extends javax.swing.JFrame {
    DefaultTableModel tmProf_prof = new DefaultTableModel(null, new String[]{"Professor"});
    List<Professor> Prof; 
    ListSelectionModel lsmProf_prof;
    
       
    static String d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16,d17,d18,d19,d20,d21,d22,d23,d24,d25,d26;
      static String disc11,disc22,disc33,disc44,disc55;
      static String asd = "";
      static String asd2= "";
      static String asd3= "";
      static String asd4= "";
      static int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,asdd;
    static int linha,coluna;
static int qwe;
    static int id_deste;
  private FormDisc_Dinamico fdr;
  MinimizaTela tela= new MinimizaTela();  
  String escolha; 
  private List<Serie> listaS; 
 Serie serie=new Serie();
 SerieMet seriemet=new SerieMet();
 ProfessorMet profmet=new ProfessorMet();
 Professor professor=new Professor();
 List <Professor> listaP;
 DisciplinaMet discmet=new DisciplinaMet();
 Disciplina disciplina=new Disciplina();
 List <Disciplina> listaD,listaDR;
 private List<Disciplina> lista;
 ProfDiscMet profdiscmet=new ProfDiscMet();
 ProfessorDisciplina profdisc= new ProfessorDisciplina();
 ProfessorSerieTurmaMet profserieturmamet= new ProfessorSerieTurmaMet();
 ProfessorDiasMet profdiasmet=new ProfessorDiasMet();
 ProfessorDias profdias=new ProfessorDias();
 List<ProfessorDias> listaPD;
 static int id=0;
 DefaultTableModel tmDisc_prof = new DefaultTableModel(null, new String[]{"Matéria"});
    ListSelectionModel lsmDisc_prof;
 DefaultTableModel tmDisc_prof_reg = new DefaultTableModel(null, new String[]{"Matéria"});
    ListSelectionModel lsmDisc_prof_reg;
    public FormProfessor() {
        
        try {
            tela.Minimiza(1);
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        initComponents();
        BufferedImage image=null;
        File imageFile=new File(".\\src\\Imagens\\logo3.png");
        try {
            image=ImageIO.read(imageFile);
            
        } catch (IOException ex) {
        }
        this.setIconImage(image);
        
//        BufferedImage image=new BufferedImage(10,10,BufferedImage.TYPE_INT_ARGB);
//        setIconImage(image);
        DesabilitaADD();
        DesabilitaALTDEL();
      
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jDialog1 = new javax.swing.JDialog();
        jPanel2 = new javax.swing.JPanel();
        jl_Pesquisar_prof = new javax.swing.JLabel();
        JTF_Pesquisar_prof = new javax.swing.JTextField();
        jScrollPane2_prof = new javax.swing.JScrollPane();
        jTTabela_Prof_prof = new javax.swing.JTable();
        jDialog2 = new javax.swing.JDialog();
        jPanel3 = new javax.swing.JPanel();
        jl_Pesquisar1_prof = new javax.swing.JLabel();
        JTF_Pesquisarmaterias_prof = new javax.swing.JTextField();
        jScrollPane3_prof = new javax.swing.JScrollPane();
        jTTabela_Disc_prof = new javax.swing.JTable();
        timer1 = new org.netbeans.examples.lib.timerbean.Timer();
        jDialog3 = new javax.swing.JDialog();
        jPanel4 = new javax.swing.JPanel();
        jl_Pesquisar2_prof = new javax.swing.JLabel();
        JTF_Pesquisarmaterias1_prof = new javax.swing.JTextField();
        jScrollPane5_prof = new javax.swing.JScrollPane();
        jTTabela_Disc1_prof = new javax.swing.JTable();
        jDialog4 = new javax.swing.JDialog();
        jPanel5 = new javax.swing.JPanel();
        jl_Pesquisar2_prof1 = new javax.swing.JLabel();
        JTF_Pesquisarmaterias1_prof_reg = new javax.swing.JTextField();
        jScrollPane5_prof1 = new javax.swing.JScrollPane();
        jTTabela_Disc1_prof_reg = new javax.swing.JTable();
        jDesktopPane1_prof = new javax.swing.JDesktopPane();
        jPanel1_prof = new javax.swing.JPanel();
        jSeparator1_prof = new javax.swing.JSeparator();
        disc5_prof = new javax.swing.JTextField();
        JLDisc5_prof = new javax.swing.JLabel();
        jRB_edt_del_prof = new javax.swing.JRadioButton();
        jRB_adicionar_prof = new javax.swing.JRadioButton();
        buton_adicionar_prof = new javax.swing.JLabel();
        buton_editar_prof = new javax.swing.JLabel();
        buton_deletar_prof = new javax.swing.JLabel();
        jl_nome_prof = new javax.swing.JLabel();
        jl_turma_prof = new javax.swing.JLabel();
        jTF_Carga_horaria_prof = new javax.swing.JTextField();
        jl_carga_horaria_prof = new javax.swing.JLabel();
        disc2_prof = new javax.swing.JTextField();
        jTF_nome_prof = new javax.swing.JTextField();
        jRB_regular_prof = new javax.swing.JRadioButton();
        jRB_profissional_prof = new javax.swing.JRadioButton();
        jl_eixo_prof = new javax.swing.JLabel();
        disc3_prof = new javax.swing.JTextField();
        disc4_prof = new javax.swing.JTextField();
        disc1_prof = new javax.swing.JTextField();
        jScrollPane1_prof = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jl_disciplina_prof = new javax.swing.JLabel();
        jl_aulas_prof = new javax.swing.JLabel();
        serie2_prof = new javax.swing.JTextField();
        serie3_prof = new javax.swing.JTextField();
        serie1_prof = new javax.swing.JTextField();
        serieC1 = new javax.swing.JTextField();
        serieC2 = new javax.swing.JTextField();
        serieC3 = new javax.swing.JTextField();
        jl_serie_prof = new javax.swing.JLabel();
        serieD1 = new javax.swing.JTextField();
        serieD2 = new javax.swing.JTextField();
        serieD3 = new javax.swing.JTextField();
        serieE1 = new javax.swing.JTextField();
        serieE2 = new javax.swing.JTextField();
        serieE3 = new javax.swing.JTextField();
        serieF1 = new javax.swing.JTextField();
        serieF2 = new javax.swing.JTextField();
        serieF3 = new javax.swing.JTextField();
        serieG1 = new javax.swing.JTextField();
        serieG2 = new javax.swing.JTextField();
        serieG3 = new javax.swing.JTextField();
        serieH1 = new javax.swing.JTextField();
        serieH2 = new javax.swing.JTextField();
        serieH3 = new javax.swing.JTextField();
        serieA1 = new javax.swing.JTextField();
        serieA2 = new javax.swing.JTextField();
        serieA3 = new javax.swing.JTextField();
        serieB1 = new javax.swing.JTextField();
        serieB2 = new javax.swing.JTextField();
        serieB3 = new javax.swing.JTextField();
        marcar = new javax.swing.JLabel();
        desmarcar = new javax.swing.JLabel();
        JLA1 = new javax.swing.JLabel();
        JLA3 = new javax.swing.JLabel();
        JLB1 = new javax.swing.JLabel();
        JLB2 = new javax.swing.JLabel();
        JLB3 = new javax.swing.JLabel();
        JLC2 = new javax.swing.JLabel();
        JLC3 = new javax.swing.JLabel();
        JLC1 = new javax.swing.JLabel();
        JLD3 = new javax.swing.JLabel();
        JLD2 = new javax.swing.JLabel();
        JLD1 = new javax.swing.JLabel();
        JLE3 = new javax.swing.JLabel();
        JLE2 = new javax.swing.JLabel();
        JLE1 = new javax.swing.JLabel();
        JLF3 = new javax.swing.JLabel();
        JLF1 = new javax.swing.JLabel();
        JLF2 = new javax.swing.JLabel();
        JLG3 = new javax.swing.JLabel();
        JLG2 = new javax.swing.JLabel();
        JLG1 = new javax.swing.JLabel();
        JLH1 = new javax.swing.JLabel();
        JLH2 = new javax.swing.JLabel();
        JLH3 = new javax.swing.JLabel();
        JLA2 = new javax.swing.JLabel();
        EixoP_prof = new javax.swing.JTextField();
        EixoR_prof = new javax.swing.JTextField();
        JLR_prof = new javax.swing.JLabel();
        JLP_prof = new javax.swing.JLabel();
        JLDisc2 = new javax.swing.JLabel();
        JLDisc3 = new javax.swing.JLabel();
        JLDisc4 = new javax.swing.JLabel();
        JLDisc1 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2_prof = new javax.swing.JLabel();
        jScrollPane4_prof = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();

        jDialog1.setTitle("Pesquisar Professor");
        jDialog1.setResizable(false);

        jPanel2.setBackground(new java.awt.Color(0, 0, 0));
        jPanel2.setLayout(null);

        jl_Pesquisar_prof.setBackground(new java.awt.Color(0, 0, 0));
        jl_Pesquisar_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 18)); // NOI18N
        jl_Pesquisar_prof.setForeground(new java.awt.Color(255, 102, 0));
        jl_Pesquisar_prof.setText("Pesquisar");
        jPanel2.add(jl_Pesquisar_prof);
        jl_Pesquisar_prof.setBounds(190, 60, 150, 40);

        JTF_Pesquisar_prof.setBackground(new java.awt.Color(0, 0, 0));
        JTF_Pesquisar_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
        JTF_Pesquisar_prof.setForeground(new java.awt.Color(255, 255, 255));
        JTF_Pesquisar_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        JTF_Pesquisar_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
        JTF_Pesquisar_prof.setCaretColor(new java.awt.Color(255, 255, 255));
        JTF_Pesquisar_prof.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                JTF_Pesquisar_profKeyReleased(evt);
            }
        });
        jPanel2.add(JTF_Pesquisar_prof);
        JTF_Pesquisar_prof.setBounds(20, 30, 470, 25);

        jScrollPane2_prof.setBackground(new java.awt.Color(0, 0, 0));
        jScrollPane2_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
        jScrollPane2_prof.setForeground(new java.awt.Color(255, 102, 0));
        jScrollPane2_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jTTabela_Prof_prof.setBackground(new java.awt.Color(0, 0, 0));
        jTTabela_Prof_prof.setForeground(new java.awt.Color(255, 255, 255));
        jTTabela_Prof_prof.setModel(tmProf_prof);
        jTTabela_Prof_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jTTabela_Prof_prof.setGridColor(new java.awt.Color(255, 255, 255));
        jTTabela_Prof_prof.setInheritsPopupMenu(true);
        jTTabela_Prof_prof.setSelectionBackground(new java.awt.Color(255, 255, 255));
        jTTabela_Prof_prof.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lsmProf_prof = jTTabela_Prof_prof.getSelectionModel();
        lsmProf_prof.addListSelectionListener(new ListSelectionListener(){
            public void valueChanged(ListSelectionEvent e){
                if(! e.getValueIsAdjusting()){
                    JTTabelaLinhaSelecionada_prof(jTTabela_Prof_prof);
                }
            }
        }
    );
    jScrollPane2_prof.setViewportView(jTTabela_Prof_prof);

    jPanel2.add(jScrollPane2_prof);
    jScrollPane2_prof.setBounds(20, 120, 470, 170);

    javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
    jDialog1.getContentPane().setLayout(jDialog1Layout);
    jDialog1Layout.setHorizontalGroup(
        jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog1Layout.setVerticalGroup(
        jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog1Layout.createSequentialGroup()
            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    jDialog2.setResizable(false);

    jPanel3.setBackground(new java.awt.Color(0, 0, 0));
    jPanel3.setLayout(null);

    jl_Pesquisar1_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_Pesquisar1_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 18)); // NOI18N
    jl_Pesquisar1_prof.setForeground(new java.awt.Color(255, 102, 0));
    jl_Pesquisar1_prof.setText("Pesquisar");
    jPanel3.add(jl_Pesquisar1_prof);
    jl_Pesquisar1_prof.setBounds(190, 60, 150, 40);

    JTF_Pesquisarmaterias_prof.setBackground(new java.awt.Color(0, 0, 0));
    JTF_Pesquisarmaterias_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    JTF_Pesquisarmaterias_prof.setForeground(new java.awt.Color(255, 255, 255));
    JTF_Pesquisarmaterias_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    JTF_Pesquisarmaterias_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    JTF_Pesquisarmaterias_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    JTF_Pesquisarmaterias_prof.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            JTF_Pesquisarmaterias_profKeyReleased(evt);
        }
    });
    jPanel3.add(JTF_Pesquisarmaterias_prof);
    JTF_Pesquisarmaterias_prof.setBounds(20, 30, 470, 25);

    jScrollPane3_prof.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane3_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane3_prof.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane3_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Disc_prof.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc_prof.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc_prof.setModel(tmDisc_prof);
    jTTabela_Disc_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Disc_prof.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Disc_prof.setInheritsPopupMenu(true);
    jTTabela_Disc_prof.setSelectionBackground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc_prof.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc_prof = jTTabela_Disc_prof.getSelectionModel();
    lsmDisc_prof.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada2_prof(jTTabela_Disc_prof);
            }
        }
    }
    );
    jScrollPane3_prof.setViewportView(jTTabela_Disc_prof);

    jPanel3.add(jScrollPane3_prof);
    jScrollPane3_prof.setBounds(20, 110, 470, 180);

    javax.swing.GroupLayout jDialog2Layout = new javax.swing.GroupLayout(jDialog2.getContentPane());
    jDialog2.getContentPane().setLayout(jDialog2Layout);
    jDialog2Layout.setHorizontalGroup(
        jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog2Layout.setVerticalGroup(
        jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog2Layout.createSequentialGroup()
            .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    timer1.addTimerListener(new org.netbeans.examples.lib.timerbean.TimerListener() {
        public void onTime(java.awt.event.ActionEvent evt) {
            timer1OnTime(evt);
        }
    });

    jDialog3.setResizable(false);

    jPanel4.setBackground(new java.awt.Color(0, 0, 0));
    jPanel4.setLayout(null);

    jl_Pesquisar2_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_Pesquisar2_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 18)); // NOI18N
    jl_Pesquisar2_prof.setForeground(new java.awt.Color(255, 102, 0));
    jl_Pesquisar2_prof.setText("Pesquisar");
    jPanel4.add(jl_Pesquisar2_prof);
    jl_Pesquisar2_prof.setBounds(190, 60, 150, 40);

    JTF_Pesquisarmaterias1_prof.setBackground(new java.awt.Color(0, 0, 0));
    JTF_Pesquisarmaterias1_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    JTF_Pesquisarmaterias1_prof.setForeground(new java.awt.Color(255, 255, 255));
    JTF_Pesquisarmaterias1_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    JTF_Pesquisarmaterias1_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    JTF_Pesquisarmaterias1_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    JTF_Pesquisarmaterias1_prof.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            JTF_Pesquisarmaterias1_profKeyReleased(evt);
        }
    });
    jPanel4.add(JTF_Pesquisarmaterias1_prof);
    JTF_Pesquisarmaterias1_prof.setBounds(20, 30, 470, 25);

    jScrollPane5_prof.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane5_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane5_prof.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane5_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Disc1_prof.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc1_prof.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof.setModel(tmDisc_prof);
    jTTabela_Disc1_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Disc1_prof.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof.setInheritsPopupMenu(true);
    jTTabela_Disc1_prof.setSelectionBackground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc_prof = jTTabela_Disc1_prof.getSelectionModel();
    lsmDisc_prof.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada3_prof(jTTabela_Disc1_prof);
            }
        }
    }
    );
    jScrollPane5_prof.setViewportView(jTTabela_Disc1_prof);

    jPanel4.add(jScrollPane5_prof);
    jScrollPane5_prof.setBounds(20, 110, 470, 180);

    javax.swing.GroupLayout jDialog3Layout = new javax.swing.GroupLayout(jDialog3.getContentPane());
    jDialog3.getContentPane().setLayout(jDialog3Layout);
    jDialog3Layout.setHorizontalGroup(
        jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog3Layout.setVerticalGroup(
        jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog3Layout.createSequentialGroup()
            .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    jDialog4.setResizable(false);

    jPanel5.setBackground(new java.awt.Color(0, 0, 0));
    jPanel5.setLayout(null);

    jl_Pesquisar2_prof1.setBackground(new java.awt.Color(0, 0, 0));
    jl_Pesquisar2_prof1.setFont(new java.awt.Font("D3 Euronism italic", 1, 18)); // NOI18N
    jl_Pesquisar2_prof1.setForeground(new java.awt.Color(255, 102, 0));
    jl_Pesquisar2_prof1.setText("Pesquisar");
    jPanel5.add(jl_Pesquisar2_prof1);
    jl_Pesquisar2_prof1.setBounds(190, 60, 150, 40);

    JTF_Pesquisarmaterias1_prof_reg.setBackground(new java.awt.Color(0, 0, 0));
    JTF_Pesquisarmaterias1_prof_reg.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    JTF_Pesquisarmaterias1_prof_reg.setForeground(new java.awt.Color(255, 255, 255));
    JTF_Pesquisarmaterias1_prof_reg.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    JTF_Pesquisarmaterias1_prof_reg.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    JTF_Pesquisarmaterias1_prof_reg.setCaretColor(new java.awt.Color(255, 255, 255));
    JTF_Pesquisarmaterias1_prof_reg.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            JTF_Pesquisarmaterias1_prof_regKeyReleased(evt);
        }
    });
    jPanel5.add(JTF_Pesquisarmaterias1_prof_reg);
    JTF_Pesquisarmaterias1_prof_reg.setBounds(20, 30, 470, 25);

    jScrollPane5_prof1.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane5_prof1.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane5_prof1.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane5_prof1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Disc1_prof_reg.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc1_prof_reg.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof_reg.setModel(tmDisc_prof_reg);
    jTTabela_Disc1_prof_reg.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Disc1_prof_reg.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof_reg.setInheritsPopupMenu(true);
    jTTabela_Disc1_prof_reg.setSelectionBackground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof_reg.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc_prof_reg = jTTabela_Disc1_prof_reg.getSelectionModel();
    lsmDisc_prof_reg.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada3_prof_reg(jTTabela_Disc1_prof_reg);
            }
        }
    }
    );
    jScrollPane5_prof1.setViewportView(jTTabela_Disc1_prof_reg);

    jPanel5.add(jScrollPane5_prof1);
    jScrollPane5_prof1.setBounds(20, 110, 470, 180);

    javax.swing.GroupLayout jDialog4Layout = new javax.swing.GroupLayout(jDialog4.getContentPane());
    jDialog4.getContentPane().setLayout(jDialog4Layout);
    jDialog4Layout.setHorizontalGroup(
        jDialog4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog4Layout.setVerticalGroup(
        jDialog4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog4Layout.createSequentialGroup()
            .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Professor");
    setResizable(false);
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosed(java.awt.event.WindowEvent evt) {
            formWindowClosed(evt);
        }
    });

    jPanel1_prof.setBackground(new java.awt.Color(0, 0, 0));
    jPanel1_prof.setLayout(null);

    jSeparator1_prof.setBackground(new java.awt.Color(255, 153, 0));
    jSeparator1_prof.setForeground(new java.awt.Color(0, 0, 0));
    jSeparator1_prof.setOrientation(javax.swing.SwingConstants.VERTICAL);
    jPanel1_prof.add(jSeparator1_prof);
    jSeparator1_prof.setBounds(170, 20, 11, 600);

    disc5_prof.setBackground(new java.awt.Color(0, 0, 0));
    disc5_prof.setEditable(false);
    disc5_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    disc5_prof.setForeground(new java.awt.Color(255, 255, 255));
    disc5_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc5_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    disc5_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    disc5_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc5_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc5_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc5_prof);
    disc5_prof.setBounds(760, 230, 350, 25);

    JLDisc5_prof.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLDisc5_prof.setForeground(new java.awt.Color(255, 255, 255));
    JLDisc5_prof.setText("X");
    JLDisc5_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc5_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc5_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc5_prof);
    JLDisc5_prof.setBounds(730, 230, 20, 30);

    jRB_edt_del_prof.setBackground(new java.awt.Color(0, 0, 0));
    buttonGroup1.add(jRB_edt_del_prof);
    jRB_edt_del_prof.setFont(new java.awt.Font("D3 Euronism italic", 0, 18)); // NOI18N
    jRB_edt_del_prof.setForeground(new java.awt.Color(255, 102, 0));
    jRB_edt_del_prof.setText("<HTML>Editar<br><br>Deletar");
    jRB_edt_del_prof.setFocusPainted(false);
    jRB_edt_del_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_edt_del_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_edt_del_prof);
    jRB_edt_del_prof.setBounds(20, 390, 140, 90);

    jRB_adicionar_prof.setBackground(new java.awt.Color(0, 0, 0));
    buttonGroup1.add(jRB_adicionar_prof);
    jRB_adicionar_prof.setFont(new java.awt.Font("D3 Euronism italic", 0, 18)); // NOI18N
    jRB_adicionar_prof.setForeground(new java.awt.Color(255, 102, 0));
    jRB_adicionar_prof.setText("Adicionar");
    jRB_adicionar_prof.setFocusPainted(false);
    jRB_adicionar_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_adicionar_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_adicionar_prof);
    jRB_adicionar_prof.setBounds(10, 230, 150, 30);

    buton_adicionar_prof.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/butonadicionar.jpg"))); // NOI18N
    buton_adicionar_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    buton_adicionar_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            buton_adicionar_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(buton_adicionar_prof);
    buton_adicionar_prof.setBounds(520, 600, 190, 40);

    buton_editar_prof.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/butoneditar.jpg"))); // NOI18N
    buton_editar_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    buton_editar_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            buton_editar_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(buton_editar_prof);
    buton_editar_prof.setBounds(360, 600, 190, 40);

    buton_deletar_prof.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/butondeletar.jpg"))); // NOI18N
    buton_deletar_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    buton_deletar_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            buton_deletar_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(buton_deletar_prof);
    buton_deletar_prof.setBounds(690, 600, 190, 40);

    jl_nome_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_nome_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 14)); // NOI18N
    jl_nome_prof.setForeground(new java.awt.Color(255, 255, 255));
    jl_nome_prof.setText("Professor: ");
    jPanel1_prof.add(jl_nome_prof);
    jl_nome_prof.setBounds(220, 50, 130, 30);

    jl_turma_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_turma_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 14)); // NOI18N
    jl_turma_prof.setForeground(new java.awt.Color(255, 255, 255));
    jl_turma_prof.setText("Turma");
    jPanel1_prof.add(jl_turma_prof);
    jl_turma_prof.setBounds(180, 270, 60, 30);

    jTF_Carga_horaria_prof.setBackground(new java.awt.Color(0, 0, 0));
    jTF_Carga_horaria_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    jTF_Carga_horaria_prof.setForeground(new java.awt.Color(255, 255, 255));
    jTF_Carga_horaria_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_Carga_horaria_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    jTF_Carga_horaria_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(jTF_Carga_horaria_prof);
    jTF_Carga_horaria_prof.setBounds(390, 100, 50, 25);

    jl_carga_horaria_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_carga_horaria_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 14)); // NOI18N
    jl_carga_horaria_prof.setForeground(new java.awt.Color(255, 255, 255));
    jl_carga_horaria_prof.setText("Carga Horaria: ");
    jPanel1_prof.add(jl_carga_horaria_prof);
    jl_carga_horaria_prof.setBounds(200, 100, 170, 30);

    disc2_prof.setBackground(new java.awt.Color(0, 0, 0));
    disc2_prof.setEditable(false);
    disc2_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    disc2_prof.setForeground(new java.awt.Color(255, 255, 255));
    disc2_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc2_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    disc2_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    disc2_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc2_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc2_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc2_prof);
    disc2_prof.setBounds(760, 110, 350, 25);

    jTF_nome_prof.setBackground(new java.awt.Color(0, 0, 0));
    jTF_nome_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    jTF_nome_prof.setForeground(new java.awt.Color(255, 255, 255));
    jTF_nome_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_nome_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    jTF_nome_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(jTF_nome_prof);
    jTF_nome_prof.setBounds(340, 50, 160, 25);

    jRB_regular_prof.setBackground(new java.awt.Color(0, 0, 0));
    jRB_regular_prof.setFont(new java.awt.Font("D3 Euronism italic", 0, 18)); // NOI18N
    jRB_regular_prof.setForeground(new java.awt.Color(255, 102, 0));
    jRB_regular_prof.setText("Regular");
    jRB_regular_prof.setFocusPainted(false);
    jRB_regular_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_regular_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_regular_prof);
    jRB_regular_prof.setBounds(580, 90, 150, 30);

    jRB_profissional_prof.setBackground(new java.awt.Color(0, 0, 0));
    jRB_profissional_prof.setFont(new java.awt.Font("D3 Euronism italic", 0, 18)); // NOI18N
    jRB_profissional_prof.setForeground(new java.awt.Color(255, 102, 0));
    jRB_profissional_prof.setText("Profissional");
    jRB_profissional_prof.setFocusPainted(false);
    jRB_profissional_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_profissional_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_profissional_prof);
    jRB_profissional_prof.setBounds(550, 140, 180, 30);

    jl_eixo_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 14)); // NOI18N
    jl_eixo_prof.setForeground(new java.awt.Color(255, 255, 255));
    jl_eixo_prof.setText("Eixo:");
    jPanel1_prof.add(jl_eixo_prof);
    jl_eixo_prof.setBounds(550, 50, 60, 30);

    disc3_prof.setBackground(new java.awt.Color(0, 0, 0));
    disc3_prof.setEditable(false);
    disc3_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    disc3_prof.setForeground(new java.awt.Color(255, 255, 255));
    disc3_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc3_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    disc3_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    disc3_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc3_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc3_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc3_prof);
    disc3_prof.setBounds(760, 150, 350, 25);

    disc4_prof.setBackground(new java.awt.Color(0, 0, 0));
    disc4_prof.setEditable(false);
    disc4_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    disc4_prof.setForeground(new java.awt.Color(255, 255, 255));
    disc4_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc4_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    disc4_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    disc4_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc4_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc4_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc4_prof);
    disc4_prof.setBounds(760, 190, 350, 25);

    disc1_prof.setBackground(new java.awt.Color(0, 0, 0));
    disc1_prof.setEditable(false);
    disc1_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    disc1_prof.setForeground(new java.awt.Color(255, 255, 255));
    disc1_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc1_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    disc1_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    disc1_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc1_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc1_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc1_prof);
    disc1_prof.setBounds(760, 70, 350, 25);

    jTable2.setBackground(new java.awt.Color(0, 0, 0));
    jTable2.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jTable2.setFont(new java.awt.Font("Bell MT", 2, 12)); // NOI18N
    jTable2.setForeground(new java.awt.Color(255, 255, 255));
    jTable2.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null}
        },
        new String [] {
            "     Segunda", "      Terça", "     Quarta", "     Quinta", "     Sexta"
        }
    ) {
        boolean[] canEdit = new boolean [] {
            false, false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    });
    jTable2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTable2.setGridColor(new java.awt.Color(255, 102, 0));
    jTable2.getTableHeader().setReorderingAllowed(false);
    jTable2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jTable2MouseClicked(evt);
        }
    });
    jScrollPane1_prof.setViewportView(jTable2);
    jTable2.getColumnModel().getColumn(0).setResizable(false);
    jTable2.getColumnModel().getColumn(1).setResizable(false);
    jTable2.getColumnModel().getColumn(2).setResizable(false);
    jTable2.getColumnModel().getColumn(3).setResizable(false);
    jTable2.getColumnModel().getColumn(4).setResizable(false);

    jPanel1_prof.add(jScrollPane1_prof);
    jScrollPane1_prof.setBounds(620, 330, 440, 180);

    jl_disciplina_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_disciplina_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 14)); // NOI18N
    jl_disciplina_prof.setForeground(new java.awt.Color(255, 255, 255));
    jl_disciplina_prof.setText("Disciplinas:");
    jPanel1_prof.add(jl_disciplina_prof);
    jl_disciplina_prof.setBounds(740, 30, 130, 30);

    jl_aulas_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_aulas_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 14)); // NOI18N
    jl_aulas_prof.setForeground(new java.awt.Color(255, 255, 255));
    jl_aulas_prof.setText("Aulas Disponiveis:");
    jPanel1_prof.add(jl_aulas_prof);
    jl_aulas_prof.setBounds(750, 290, 210, 30);

    serie2_prof.setEditable(false);
    serie2_prof.setBackground(new java.awt.Color(0, 0, 0));
    serie2_prof.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serie2_prof.setForeground(new java.awt.Color(255, 255, 255));
    serie2_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serie2_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serie2_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serie2_prof);
    serie2_prof.setBounds(360, 200, 40, 31);

    serie3_prof.setEditable(false);
    serie3_prof.setBackground(new java.awt.Color(0, 0, 0));
    serie3_prof.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serie3_prof.setForeground(new java.awt.Color(255, 255, 255));
    serie3_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serie3_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serie3_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serie3_prof);
    serie3_prof.setBounds(440, 200, 40, 31);

    serie1_prof.setEditable(false);
    serie1_prof.setBackground(new java.awt.Color(0, 0, 0));
    serie1_prof.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serie1_prof.setForeground(new java.awt.Color(255, 255, 255));
    serie1_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serie1_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serie1_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serie1_prof);
    serie1_prof.setBounds(280, 200, 40, 31);

    serieC1.setBackground(new java.awt.Color(0, 0, 0));
    serieC1.setEditable(false);
    serieC1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieC1.setForeground(new java.awt.Color(255, 255, 255));
    serieC1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieC1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieC1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieC1);
    serieC1.setBounds(280, 350, 40, 31);

    serieC2.setBackground(new java.awt.Color(0, 0, 0));
    serieC2.setEditable(false);
    serieC2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieC2.setForeground(new java.awt.Color(255, 255, 255));
    serieC2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieC2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieC2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieC2);
    serieC2.setBounds(360, 350, 40, 31);

    serieC3.setBackground(new java.awt.Color(0, 0, 0));
    serieC3.setEditable(false);
    serieC3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieC3.setForeground(new java.awt.Color(255, 255, 255));
    serieC3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieC3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieC3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieC3);
    serieC3.setBounds(440, 350, 40, 31);

    jl_serie_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_serie_prof.setFont(new java.awt.Font("D3 Euronism italic", 1, 14)); // NOI18N
    jl_serie_prof.setForeground(new java.awt.Color(255, 255, 255));
    jl_serie_prof.setText("Serie");
    jPanel1_prof.add(jl_serie_prof);
    jl_serie_prof.setBounds(190, 200, 60, 30);

    serieD1.setBackground(new java.awt.Color(0, 0, 0));
    serieD1.setEditable(false);
    serieD1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieD1.setForeground(new java.awt.Color(255, 255, 255));
    serieD1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieD1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieD1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieD1);
    serieD1.setBounds(280, 390, 40, 31);

    serieD2.setBackground(new java.awt.Color(0, 0, 0));
    serieD2.setEditable(false);
    serieD2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieD2.setForeground(new java.awt.Color(255, 255, 255));
    serieD2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieD2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieD2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieD2);
    serieD2.setBounds(360, 390, 40, 31);

    serieD3.setBackground(new java.awt.Color(0, 0, 0));
    serieD3.setEditable(false);
    serieD3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieD3.setForeground(new java.awt.Color(255, 255, 255));
    serieD3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieD3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieD3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieD3);
    serieD3.setBounds(440, 390, 40, 31);

    serieE1.setBackground(new java.awt.Color(0, 0, 0));
    serieE1.setEditable(false);
    serieE1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieE1.setForeground(new java.awt.Color(255, 255, 255));
    serieE1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieE1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieE1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieE1);
    serieE1.setBounds(280, 430, 40, 31);

    serieE2.setBackground(new java.awt.Color(0, 0, 0));
    serieE2.setEditable(false);
    serieE2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieE2.setForeground(new java.awt.Color(255, 255, 255));
    serieE2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieE2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieE2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieE2);
    serieE2.setBounds(360, 430, 40, 31);

    serieE3.setBackground(new java.awt.Color(0, 0, 0));
    serieE3.setEditable(false);
    serieE3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieE3.setForeground(new java.awt.Color(255, 255, 255));
    serieE3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieE3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieE3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieE3);
    serieE3.setBounds(440, 430, 40, 31);

    serieF1.setBackground(new java.awt.Color(0, 0, 0));
    serieF1.setEditable(false);
    serieF1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieF1.setForeground(new java.awt.Color(255, 255, 255));
    serieF1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieF1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieF1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieF1);
    serieF1.setBounds(280, 470, 40, 31);

    serieF2.setBackground(new java.awt.Color(0, 0, 0));
    serieF2.setEditable(false);
    serieF2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieF2.setForeground(new java.awt.Color(255, 255, 255));
    serieF2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieF2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieF2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieF2);
    serieF2.setBounds(360, 470, 40, 31);

    serieF3.setBackground(new java.awt.Color(0, 0, 0));
    serieF3.setEditable(false);
    serieF3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieF3.setForeground(new java.awt.Color(255, 255, 255));
    serieF3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieF3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieF3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieF3);
    serieF3.setBounds(440, 470, 40, 31);

    serieG1.setBackground(new java.awt.Color(0, 0, 0));
    serieG1.setEditable(false);
    serieG1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieG1.setForeground(new java.awt.Color(255, 255, 255));
    serieG1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieG1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieG1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieG1);
    serieG1.setBounds(280, 510, 40, 31);

    serieG2.setBackground(new java.awt.Color(0, 0, 0));
    serieG2.setEditable(false);
    serieG2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieG2.setForeground(new java.awt.Color(255, 255, 255));
    serieG2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieG2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieG2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieG2);
    serieG2.setBounds(360, 510, 40, 31);

    serieG3.setBackground(new java.awt.Color(0, 0, 0));
    serieG3.setEditable(false);
    serieG3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieG3.setForeground(new java.awt.Color(255, 255, 255));
    serieG3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieG3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieG3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieG3);
    serieG3.setBounds(440, 510, 40, 31);

    serieH1.setBackground(new java.awt.Color(0, 0, 0));
    serieH1.setEditable(false);
    serieH1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieH1.setForeground(new java.awt.Color(255, 255, 255));
    serieH1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieH1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieH1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieH1);
    serieH1.setBounds(280, 550, 40, 31);

    serieH2.setBackground(new java.awt.Color(0, 0, 0));
    serieH2.setEditable(false);
    serieH2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieH2.setForeground(new java.awt.Color(255, 255, 255));
    serieH2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieH2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieH2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieH2);
    serieH2.setBounds(360, 550, 40, 31);

    serieH3.setBackground(new java.awt.Color(0, 0, 0));
    serieH3.setEditable(false);
    serieH3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieH3.setForeground(new java.awt.Color(255, 255, 255));
    serieH3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieH3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieH3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieH3);
    serieH3.setBounds(440, 550, 40, 31);

    serieA1.setBackground(new java.awt.Color(0, 0, 0));
    serieA1.setEditable(false);
    serieA1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieA1.setForeground(new java.awt.Color(255, 255, 255));
    serieA1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieA1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieA1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieA1);
    serieA1.setBounds(280, 270, 40, 31);

    serieA2.setBackground(new java.awt.Color(0, 0, 0));
    serieA2.setEditable(false);
    serieA2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieA2.setForeground(new java.awt.Color(255, 255, 255));
    serieA2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieA2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieA2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieA2);
    serieA2.setBounds(360, 270, 40, 31);

    serieA3.setBackground(new java.awt.Color(0, 0, 0));
    serieA3.setEditable(false);
    serieA3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieA3.setForeground(new java.awt.Color(255, 255, 255));
    serieA3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieA3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieA3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieA3);
    serieA3.setBounds(440, 270, 40, 31);

    serieB1.setBackground(new java.awt.Color(0, 0, 0));
    serieB1.setEditable(false);
    serieB1.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieB1.setForeground(new java.awt.Color(255, 255, 255));
    serieB1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieB1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieB1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieB1);
    serieB1.setBounds(280, 310, 40, 31);

    serieB2.setBackground(new java.awt.Color(0, 0, 0));
    serieB2.setEditable(false);
    serieB2.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieB2.setForeground(new java.awt.Color(255, 255, 255));
    serieB2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieB2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieB2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieB2);
    serieB2.setBounds(360, 310, 40, 31);

    serieB3.setBackground(new java.awt.Color(0, 0, 0));
    serieB3.setEditable(false);
    serieB3.setFont(new java.awt.Font("Bell MT", 3, 24)); // NOI18N
    serieB3.setForeground(new java.awt.Color(255, 255, 255));
    serieB3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieB3.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 2, 2, new java.awt.Color(255, 255, 255)));
    serieB3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieB3);
    serieB3.setBounds(440, 310, 40, 31);

    marcar.setFont(new java.awt.Font("Neuropol", 1, 18)); // NOI18N
    marcar.setForeground(new java.awt.Color(255, 255, 255));
    marcar.setText("Marcar tudo");
    marcar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    marcar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            marcarMouseClicked(evt);
        }
    });
    jPanel1_prof.add(marcar);
    marcar.setBounds(620, 520, 134, 20);

    desmarcar.setFont(new java.awt.Font("Neuropol", 1, 18)); // NOI18N
    desmarcar.setForeground(new java.awt.Color(255, 255, 255));
    desmarcar.setText("Desmarcar tudo");
    desmarcar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    desmarcar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            desmarcarMouseClicked(evt);
        }
    });
    jPanel1_prof.add(desmarcar);
    desmarcar.setBounds(890, 520, 173, 20);

    JLA1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLA1.setForeground(new java.awt.Color(255, 255, 255));
    JLA1.setText("X");
    JLA1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLA1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLA1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLA1);
    JLA1.setBounds(260, 270, 20, 30);

    JLA3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLA3.setForeground(new java.awt.Color(255, 255, 255));
    JLA3.setText("X");
    JLA3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLA3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLA3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLA3);
    JLA3.setBounds(420, 270, 20, 30);

    JLB1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLB1.setForeground(new java.awt.Color(255, 255, 255));
    JLB1.setText("X");
    JLB1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLB1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLB1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLB1);
    JLB1.setBounds(260, 310, 20, 30);

    JLB2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLB2.setForeground(new java.awt.Color(255, 255, 255));
    JLB2.setText("X");
    JLB2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLB2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLB2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLB2);
    JLB2.setBounds(340, 310, 20, 30);

    JLB3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLB3.setForeground(new java.awt.Color(255, 255, 255));
    JLB3.setText("X");
    JLB3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLB3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLB3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLB3);
    JLB3.setBounds(420, 310, 20, 30);

    JLC2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLC2.setForeground(new java.awt.Color(255, 255, 255));
    JLC2.setText("X");
    JLC2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLC2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLC2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLC2);
    JLC2.setBounds(340, 350, 20, 30);

    JLC3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLC3.setForeground(new java.awt.Color(255, 255, 255));
    JLC3.setText("X");
    JLC3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLC3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLC3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLC3);
    JLC3.setBounds(420, 350, 20, 30);

    JLC1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLC1.setForeground(new java.awt.Color(255, 255, 255));
    JLC1.setText("X");
    JLC1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLC1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLC1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLC1);
    JLC1.setBounds(260, 350, 20, 30);

    JLD3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLD3.setForeground(new java.awt.Color(255, 255, 255));
    JLD3.setText("X");
    JLD3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLD3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLD3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLD3);
    JLD3.setBounds(420, 390, 20, 30);

    JLD2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLD2.setForeground(new java.awt.Color(255, 255, 255));
    JLD2.setText("X");
    JLD2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLD2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLD2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLD2);
    JLD2.setBounds(340, 390, 20, 30);

    JLD1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLD1.setForeground(new java.awt.Color(255, 255, 255));
    JLD1.setText("X");
    JLD1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLD1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLD1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLD1);
    JLD1.setBounds(260, 390, 20, 30);

    JLE3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLE3.setForeground(new java.awt.Color(255, 255, 255));
    JLE3.setText("X");
    JLE3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLE3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLE3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLE3);
    JLE3.setBounds(420, 430, 20, 30);

    JLE2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLE2.setForeground(new java.awt.Color(255, 255, 255));
    JLE2.setText("X");
    JLE2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLE2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLE2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLE2);
    JLE2.setBounds(340, 430, 20, 30);

    JLE1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLE1.setForeground(new java.awt.Color(255, 255, 255));
    JLE1.setText("X");
    JLE1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLE1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLE1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLE1);
    JLE1.setBounds(260, 430, 20, 30);

    JLF3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLF3.setForeground(new java.awt.Color(255, 255, 255));
    JLF3.setText("X");
    JLF3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLF3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLF3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLF3);
    JLF3.setBounds(420, 470, 20, 30);

    JLF1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLF1.setForeground(new java.awt.Color(255, 255, 255));
    JLF1.setText("X");
    JLF1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLF1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLF1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLF1);
    JLF1.setBounds(260, 470, 20, 30);

    JLF2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLF2.setForeground(new java.awt.Color(255, 255, 255));
    JLF2.setText("X");
    JLF2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLF2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLF2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLF2);
    JLF2.setBounds(340, 470, 20, 30);

    JLG3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLG3.setForeground(new java.awt.Color(255, 255, 255));
    JLG3.setText("X");
    JLG3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLG3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLG3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLG3);
    JLG3.setBounds(420, 510, 20, 30);

    JLG2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLG2.setForeground(new java.awt.Color(255, 255, 255));
    JLG2.setText("X");
    JLG2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLG2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLG2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLG2);
    JLG2.setBounds(340, 510, 20, 30);

    JLG1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLG1.setForeground(new java.awt.Color(255, 255, 255));
    JLG1.setText("X");
    JLG1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLG1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLG1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLG1);
    JLG1.setBounds(260, 510, 20, 30);

    JLH1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLH1.setForeground(new java.awt.Color(255, 255, 255));
    JLH1.setText("X");
    JLH1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLH1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLH1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLH1);
    JLH1.setBounds(260, 550, 20, 30);

    JLH2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLH2.setForeground(new java.awt.Color(255, 255, 255));
    JLH2.setText("X");
    JLH2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLH2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLH2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLH2);
    JLH2.setBounds(340, 550, 20, 30);

    JLH3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLH3.setForeground(new java.awt.Color(255, 255, 255));
    JLH3.setText("X");
    JLH3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLH3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLH3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLH3);
    JLH3.setBounds(420, 550, 20, 30);

    JLA2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLA2.setForeground(new java.awt.Color(255, 255, 255));
    JLA2.setText("X");
    JLA2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLA2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLA2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLA2);
    JLA2.setBounds(340, 270, 20, 30);

    EixoP_prof.setEditable(false);
    EixoP_prof.setBackground(new java.awt.Color(0, 0, 0));
    EixoP_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    EixoP_prof.setForeground(new java.awt.Color(255, 255, 255));
    EixoP_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    EixoP_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    EixoP_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(EixoP_prof);
    EixoP_prof.setBounds(580, 140, 140, 25);

    EixoR_prof.setEditable(false);
    EixoR_prof.setBackground(new java.awt.Color(0, 0, 0));
    EixoR_prof.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
    EixoR_prof.setForeground(new java.awt.Color(255, 255, 255));
    EixoR_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    EixoR_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)));
    EixoR_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(EixoR_prof);
    EixoR_prof.setBounds(580, 100, 140, 25);

    JLR_prof.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLR_prof.setForeground(new java.awt.Color(255, 255, 255));
    JLR_prof.setText("X");
    JLR_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLR_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLR_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLR_prof);
    JLR_prof.setBounds(550, 100, 20, 30);

    JLP_prof.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLP_prof.setForeground(new java.awt.Color(255, 255, 255));
    JLP_prof.setText("X");
    JLP_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLP_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLP_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLP_prof);
    JLP_prof.setBounds(550, 140, 20, 30);

    JLDisc2.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLDisc2.setForeground(new java.awt.Color(255, 255, 255));
    JLDisc2.setText("X");
    JLDisc2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc2);
    JLDisc2.setBounds(730, 110, 20, 30);

    JLDisc3.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLDisc3.setForeground(new java.awt.Color(255, 255, 255));
    JLDisc3.setText("X");
    JLDisc3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc3);
    JLDisc3.setBounds(730, 150, 20, 30);

    JLDisc4.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLDisc4.setForeground(new java.awt.Color(255, 255, 255));
    JLDisc4.setText("X");
    JLDisc4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc4.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc4MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc4);
    JLDisc4.setBounds(730, 190, 20, 30);

    JLDisc1.setFont(new java.awt.Font("MV Boli", 1, 24)); // NOI18N
    JLDisc1.setForeground(new java.awt.Color(255, 255, 255));
    JLDisc1.setText("X");
    JLDisc1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc1);
    JLDisc1.setBounds(730, 70, 20, 30);

    jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 102, 0), 2));
    jPanel1_prof.add(jLabel1);
    jLabel1.setBounds(540, 30, 580, 240);

    jLabel2_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 102, 0), 2));
    jPanel1_prof.add(jLabel2_prof);
    jLabel2_prof.setBounds(190, 30, 330, 130);

    jTable1.setBackground(new java.awt.Color(0, 0, 0));
    jTable1.setForeground(new java.awt.Color(255, 102, 0));
    jTable1.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {"    1ª"},
            {"    2ª  "},
            {"    3ª"},
            {"    4ª"},
            {"    5ª "},
            {"    6ª"},
            {"    7ª"},
            {"    8ª"},
            {"    9ª"}
        },
        new String [] {
            "Aulas"
        }
    ) {
        boolean[] canEdit = new boolean [] {
            false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    });
    jTable1.setGridColor(new java.awt.Color(255, 102, 0));
    jScrollPane4_prof.setViewportView(jTable1);

    jPanel1_prof.add(jScrollPane4_prof);
    jScrollPane4_prof.setBounds(570, 330, 50, 180);

    jPanel1_prof.setBounds(0, 0, 1160, 900);
    jDesktopPane1_prof.add(jPanel1_prof, javax.swing.JLayeredPane.DEFAULT_LAYER);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jDesktopPane1_prof, javax.swing.GroupLayout.PREFERRED_SIZE, 1139, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jDesktopPane1_prof, javax.swing.GroupLayout.PREFERRED_SIZE, 689, javax.swing.GroupLayout.PREFERRED_SIZE)
    );

    java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    setBounds((screenSize.width-1143)/2, (screenSize.height-685)/2, 1143, 685);
    }// </editor-fold>//GEN-END:initComponents

    private void jTable2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable2MouseClicked
jTable2.setSelectionBackground(getForeground());
jTable2.setSelectionForeground(getBackground());
coluna=jTable2.getSelectedColumn();
linha=jTable2.getSelectedRow();
String verf=(String) jTable2.getValueAt(linha, coluna);
if(!"".equals(verf)){
       jTable2.setValueAt("", linha, coluna);
}else{
 jTable2.setValueAt("    Disponivel", linha, coluna);
}
    }//GEN-LAST:event_jTable2MouseClicked

    private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
jDialog1.setVisible(false);
        try {
            tela.Minimiza(0);
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        
       java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new ChamaLayout().setVisible(true);
            }
        });         
    }//GEN-LAST:event_formWindowClosed

    private void jRB_regular_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_regular_profItemStateChanged
        if(jRB_regular_prof.isSelected()){
            if(discmet.BuscaSEHADiscReg()){
                AbilitaBuscarDiscReg();
                java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
                jDialog4.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
                jDialog4.setVisible(true);
                
        }else{
            JOptionPane.showMessageDialog(null, "Não existem materias regulares cadastradas");
        }
        }
    }//GEN-LAST:event_jRB_regular_profItemStateChanged

    private void jRB_profissional_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_profissional_profItemStateChanged
        CursoMet cursomet=new CursoMet();
        
        if(jRB_profissional_prof.isSelected()){
            if(cursomet.Buscar_Se_Ha_Curso()){
            AbilitaBuscarDiscCurso();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jDialog3.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
jDialog3.setVisible(true);
//          java.awt.EventQueue.invokeLater(new Runnable() {
//
//            @Override
//            public void run() {
//                new FormCursoDinamico().setVisible(true);
//            }
//        });
          }else{
        JOptionPane.showMessageDialog(null, "Não existem materias profissionais cadastradas");
    }   
        }
       
    }//GEN-LAST:event_jRB_profissional_profItemStateChanged

    private void jRB_adicionar_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_adicionar_profItemStateChanged
      if(jRB_adicionar_prof.isSelected()){
          jDialog1.setVisible(false);
       limpaDadosALTDEL();
       DesabilitaALTDEL();
       escolha=jRB_adicionar_prof.getText();
       ChamaEscolha(escolha);
       VerificaSerieTurma();
      }
    }//GEN-LAST:event_jRB_adicionar_profItemStateChanged

    private void desmarcarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_desmarcarMouseClicked
        jTable2.getModel().setValueAt("", 0,0);
        jTable2.getModel().setValueAt("", 1,0);
        jTable2.getModel().setValueAt("", 2,0);
        jTable2.getModel().setValueAt("", 3,0);
        jTable2.getModel().setValueAt("", 4,0);
        jTable2.getModel().setValueAt("", 5,0);
        jTable2.getModel().setValueAt("", 6,0);
        jTable2.getModel().setValueAt("", 7,0);
        jTable2.getModel().setValueAt("", 8,0);
        
        jTable2.getModel().setValueAt("", 0,1);
        jTable2.getModel().setValueAt("", 1,1);
        jTable2.getModel().setValueAt("", 2,1);
        jTable2.getModel().setValueAt("", 3,1);
        jTable2.getModel().setValueAt("", 4,1);
        jTable2.getModel().setValueAt("", 5,1);
        jTable2.getModel().setValueAt("", 6,1);
        jTable2.getModel().setValueAt("", 7,1);
        jTable2.getModel().setValueAt("", 8,1);
        
        jTable2.getModel().setValueAt("", 0,2);
        jTable2.getModel().setValueAt("", 1,2);
        jTable2.getModel().setValueAt("", 2,2);
        jTable2.getModel().setValueAt("", 3,2);
        jTable2.getModel().setValueAt("", 4,2);
        jTable2.getModel().setValueAt("", 5,2);
        jTable2.getModel().setValueAt("", 6,2);
        jTable2.getModel().setValueAt("", 7,2);
        jTable2.getModel().setValueAt("", 8,2);
        
        jTable2.getModel().setValueAt("", 0,3);
        jTable2.getModel().setValueAt("", 1,3);
        jTable2.getModel().setValueAt("", 2,3);
        jTable2.getModel().setValueAt("", 3,3);
        jTable2.getModel().setValueAt("", 4,3);
        jTable2.getModel().setValueAt("", 5,3);
        jTable2.getModel().setValueAt("", 6,3);
        jTable2.getModel().setValueAt("", 7,3);
        jTable2.getModel().setValueAt("", 8,3);
       
        jTable2.getModel().setValueAt("", 0,4);
        jTable2.getModel().setValueAt("", 1,4);
        jTable2.getModel().setValueAt("", 2,4);
        jTable2.getModel().setValueAt("", 3,4);
        jTable2.getModel().setValueAt("", 4,4);
        jTable2.getModel().setValueAt("", 5,4);
        jTable2.getModel().setValueAt("", 6,4);
        jTable2.getModel().setValueAt("", 7,4);
        jTable2.getModel().setValueAt("", 8,4);    
        
    }//GEN-LAST:event_desmarcarMouseClicked

    private void marcarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_marcarMouseClicked
  jTable2.getModel().setValueAt("    Disponivel", 0,0);
        jTable2.getModel().setValueAt("    Disponivel", 1,0);
        jTable2.getModel().setValueAt("    Disponivel", 2,0);
        jTable2.getModel().setValueAt("    Disponivel", 3,0);
        jTable2.getModel().setValueAt("    Disponivel", 4,0);
        jTable2.getModel().setValueAt("    Disponivel", 5,0);
        jTable2.getModel().setValueAt("    Disponivel", 6,0);
        jTable2.getModel().setValueAt("    Disponivel", 7,0);
        jTable2.getModel().setValueAt("    Disponivel", 8,0);
        
        jTable2.getModel().setValueAt("    Disponivel", 0,1);
        jTable2.getModel().setValueAt("    Disponivel", 1,1);
        jTable2.getModel().setValueAt("    Disponivel", 2,1);
        jTable2.getModel().setValueAt("    Disponivel", 3,1);
        jTable2.getModel().setValueAt("    Disponivel", 4,1);
        jTable2.getModel().setValueAt("    Disponivel", 5,1);
        jTable2.getModel().setValueAt("    Disponivel", 6,1);
        jTable2.getModel().setValueAt("    Disponivel", 7,1);
        jTable2.getModel().setValueAt("    Disponivel", 8,1);
        
        jTable2.getModel().setValueAt("    Disponivel", 0,2);
        jTable2.getModel().setValueAt("    Disponivel", 1,2);
        jTable2.getModel().setValueAt("    Disponivel", 2,2);
        jTable2.getModel().setValueAt("    Disponivel", 3,2);
        jTable2.getModel().setValueAt("    Disponivel", 4,2);
        jTable2.getModel().setValueAt("    Disponivel", 5,2);
        jTable2.getModel().setValueAt("    Disponivel", 6,2);
        jTable2.getModel().setValueAt("    Disponivel", 7,2);
        jTable2.getModel().setValueAt("    Disponivel", 8,2);
        
        jTable2.getModel().setValueAt("    Disponivel", 0,3);
        jTable2.getModel().setValueAt("    Disponivel", 1,3);
        jTable2.getModel().setValueAt("    Disponivel", 2,3);
        jTable2.getModel().setValueAt("    Disponivel", 3,3);
        jTable2.getModel().setValueAt("    Disponivel", 4,3);
        jTable2.getModel().setValueAt("    Disponivel", 5,3);
        jTable2.getModel().setValueAt("    Disponivel", 6,3);
        jTable2.getModel().setValueAt("    Disponivel", 7,3);
        jTable2.getModel().setValueAt("    Disponivel", 8,3);
        
        jTable2.getModel().setValueAt("    Disponivel", 0,4);
        jTable2.getModel().setValueAt("    Disponivel", 1,4);
        jTable2.getModel().setValueAt("    Disponivel", 2,4);
        jTable2.getModel().setValueAt("    Disponivel", 3,4);
        jTable2.getModel().setValueAt("    Disponivel", 4,4);
        jTable2.getModel().setValueAt("    Disponivel", 5,4);
        jTable2.getModel().setValueAt("    Disponivel", 6,4);
        jTable2.getModel().setValueAt("    Disponivel", 7,4);
        jTable2.getModel().setValueAt("    Disponivel", 8,4);
        
    }//GEN-LAST:event_marcarMouseClicked

    private void timer1OnTime(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timer1OnTime
       d1=Porenquanto.getM1();
        if("".equals(d1)){
        a=1;
        }
        d2=Porenquanto.getM2();
        if("".equals(d2)){
        b=1;
        }
        d3=Porenquanto.getM3();
        if("".equals(d3)){
        c=1;
        }
        d4=Porenquanto.getM4();
        if("".equals(d4)){
        d=1;
        }
        d5=Porenquanto.getM5();
        if("".equals(d5)){
        e=1;
        }
        d6=Porenquanto.getM6();
        if("".equals(d6)){
        f=1;
        }
        d7=Porenquanto.getM7();
        if("".equals(d7)){
        g=1;
        }
        d8=Porenquanto.getM8();
        if("".equals(d8)){
        h=1;
        }
        d9=Porenquanto.getM9();
        if("".equals(d9)){
        i=1;
        }
        d10=Porenquanto.getM10();
        if("".equals(d10)){
        j=1;
        }
        d11=Porenquanto.getM11();
        if("".equals(d11)){
        k=1;
        }
        d12=Porenquanto.getM12();
        if("".equals(d12)){
        l=1;
        }
        d13=Porenquanto.getM13();
        if("".equals(d13)){
        m=1;
        }
        d14=Porenquanto.getM14();
        if("".equals(d14)){
        n=1;
        }
        d15=Porenquanto.getM15();
        if("".equals(d15)){
        o=1;
        }
        d16=Porenquanto.getM16();
        if("".equals(d16)){
        p=1;
        }
        d17=Porenquanto.getM17();
        if("".equals(d17)){
        q=1;
        }
        d18=Porenquanto.getM18();
        if("".equals(d18)){
        r=1;
        }
        d19=Porenquanto.getM19();
        if("".equals(d19)){
        s=1;
        }
        d20=Porenquanto.getM20();
        if("".equals(d20)){
        t=1;
        }
        d21=Porenquanto.getM21();
        if("".equals(d21)){
        u=1;
        }
        d22=Porenquanto.getM22();
        if("".equals(d22)){
        v=1;
        }
        d23=Porenquanto.getM23();
        if("".equals(d23)){
        w=1;
        }
        d24=Porenquanto.getM24();
        if("".equals(d24)){
        x=1;
        }
        d25=Porenquanto.getM25();
        if("".equals(d25)){
        y=1;
        }
        d26=Porenquanto.getM26();
        if("".equals(d26)){
        z=1;
        }
        disc11=disc1_prof.getText();
        disc22=disc2_prof.getText();
        disc33=disc3_prof.getText();
        disc44=disc4_prof.getText();
        disc55=disc5_prof.getText();
        disc1();
        disc2();
        disc3();
        disc4();
        disc5();
    }//GEN-LAST:event_timer1OnTime

    private void jRB_edt_del_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_edt_del_profItemStateChanged
    if(jRB_edt_del_prof.isSelected()){
        limpaDadosADD();
            try {
                listaP = profmet.BuscarNome("%");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
       if(listaP.isEmpty()){
           JOptionPane.showMessageDialog(null, "Não há Professores cadastrados.");
           DesabilitaADD();
           buttonGroup1.clearSelection();
            
       }else{
        DesabilitaADD();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jDialog1.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
        jDialog1.setVisible(true);
        
        listarProfessor();
        
        
       }
      
       
    }
    }//GEN-LAST:event_jRB_edt_del_profItemStateChanged

    private void JLA1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLA1MouseClicked
      if("X".equals(JLA1.getText())){
         JLA1.setText("V"); 
         JLA1.setForeground(Color.orange);
      }else{
        JLA1.setText("X"); 
         JLA1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLA1MouseClicked

    private void JLA2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLA2MouseClicked
      if("X".equals(JLA2.getText())){
         JLA2.setText("V"); 
         JLA2.setForeground(Color.orange);
      }else{
        JLA2.setText("X"); 
         JLA2.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLA2MouseClicked

    private void JLA3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLA3MouseClicked
if("X".equals(JLA3.getText())){
         JLA3.setText("V"); 
         JLA3.setForeground(Color.orange);
      }else{
        JLA3.setText("X"); 
         JLA3.setForeground(Color.WHITE);
    }        // TODO add your handling code here:
    }//GEN-LAST:event_JLA3MouseClicked

    private void JLB1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLB1MouseClicked
   if("X".equals(JLB1.getText())){
         JLB1.setText("V"); 
         JLB1.setForeground(Color.orange);
      }else{
        JLB1.setText("X"); 
         JLB1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLB1MouseClicked

    private void JLB2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLB2MouseClicked
    if("X".equals(JLB2.getText())){
         JLB2.setText("V"); 
         JLB2.setForeground(Color.orange);
      }else{
        JLB2.setText("X"); 
         JLB2.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLB2MouseClicked

    private void JLB3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLB3MouseClicked
     if("X".equals(JLB3.getText())){
         JLB3.setText("V"); 
         JLB3.setForeground(Color.orange);
      }else{
        JLB3.setText("X"); 
         JLB3.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLB3MouseClicked

    private void JLC1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLC1MouseClicked
 if("X".equals(JLC1.getText())){
         JLC1.setText("V"); 
         JLC1.setForeground(Color.orange);
      }else{
        JLC1.setText("X"); 
         JLC1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLC1MouseClicked

    private void JLC2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLC2MouseClicked
     if("X".equals(JLC2.getText())){
         JLC2.setText("V"); 
         JLC2.setForeground(Color.orange);
      }else{
        JLC2.setText("X"); 
         JLC2.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLC2MouseClicked

    private void JLC3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLC3MouseClicked
      if("X".equals(JLC3.getText())){
         JLC3.setText("V"); 
         JLC3.setForeground(Color.orange);
      }else{
        JLC3.setText("X"); 
         JLC3.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLC3MouseClicked

    private void JLD1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLD1MouseClicked
    if("X".equals(JLD1.getText())){
         JLD1.setText("V"); 
         JLD1.setForeground(Color.orange);
      }else{
        JLD1.setText("X"); 
         JLD1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLD1MouseClicked

    private void JLD2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLD2MouseClicked
     if("X".equals(JLD2.getText())){
         JLD2.setText("V"); 
         JLD2.setForeground(Color.orange);
      }else{
        JLD2.setText("X"); 
         JLD2.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLD2MouseClicked

    private void JLD3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLD3MouseClicked
if("X".equals(JLD3.getText())){
         JLD3.setText("V"); 
         JLD3.setForeground(Color.orange);
      }else{
        JLD3.setText("X"); 
         JLD3.setForeground(Color.WHITE);
    }      
    }//GEN-LAST:event_JLD3MouseClicked

    private void JLE1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLE1MouseClicked
      if("X".equals(JLE1.getText())){
         JLE1.setText("V"); 
         JLE1.setForeground(Color.orange);
      }else{
        JLE1.setText("X"); 
         JLE1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLE1MouseClicked

    private void JLE2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLE2MouseClicked
     if("X".equals(JLE2.getText())){
         JLE2.setText("V"); 
         JLE2.setForeground(Color.orange);
      }else{
        JLE2.setText("X"); 
         JLE2.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLE2MouseClicked

    private void JLE3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLE3MouseClicked
    if("X".equals(JLE3.getText())){
         JLE3.setText("V"); 
         JLE3.setForeground(Color.orange);
      }else{
        JLE3.setText("X"); 
         JLE3.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLE3MouseClicked

    private void JLF1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLF1MouseClicked
     if("X".equals(JLF1.getText())){
         JLF1.setText("V"); 
         JLF1.setForeground(Color.orange);
      }else{
        JLF1.setText("X"); 
         JLF1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLF1MouseClicked

    private void JLF2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLF2MouseClicked
if("X".equals(JLF2.getText())){
         JLF2.setText("V"); 
         JLF2.setForeground(Color.orange);
      }else{
        JLF2.setText("X"); 
         JLF2.setForeground(Color.WHITE);
    }     
    }//GEN-LAST:event_JLF2MouseClicked

    private void JLF3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLF3MouseClicked
       if("X".equals(JLF3.getText())){
         JLF3.setText("V"); 
         JLF3.setForeground(Color.orange);
      }else{
        JLF3.setText("X"); 
         JLF3.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLF3MouseClicked

    private void JLG1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLG1MouseClicked
      if("X".equals(JLG1.getText())){
         JLG1.setText("V"); 
         JLG1.setForeground(Color.orange);
      }else{
        JLG1.setText("X"); 
         JLG1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLG1MouseClicked

    private void JLG2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLG2MouseClicked
      if("X".equals(JLG2.getText())){
         JLG2.setText("V"); 
         JLG2.setForeground(Color.orange);
      }else{
        JLG2.setText("X"); 
         JLG2.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLG2MouseClicked

    private void JLG3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLG3MouseClicked
      if("X".equals(JLG1.getText())){
         JLG3.setText("V"); 
         JLG3.setForeground(Color.orange);
      }else{
        JLG3.setText("X"); 
         JLG3.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLG3MouseClicked

    private void JLH1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLH1MouseClicked
    if("X".equals(JLH1.getText())){
         JLH1.setText("V"); 
         JLH1.setForeground(Color.orange);
      }else{
        JLH1.setText("X"); 
         JLH1.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLH1MouseClicked

    private void JLH2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLH2MouseClicked
      if("X".equals(JLH2.getText())){
         JLH2.setText("V"); 
         JLH2.setForeground(Color.orange);
      }else{
        JLH2.setText("X"); 
         JLH2.setForeground(Color.WHITE);
    }
    }//GEN-LAST:event_JLH2MouseClicked

    private void JLH3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLH3MouseClicked
if("X".equals(JLH3.getText())){
         JLH3.setText("V"); 
         JLH3.setForeground(Color.orange);
      }else{
        JLH3.setText("X"); 
         JLH3.setForeground(Color.WHITE);
    }     
    }//GEN-LAST:event_JLH3MouseClicked

    private void JTF_Pesquisar_profKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisar_profKeyReleased

        listarProfessor();     }//GEN-LAST:event_JTF_Pesquisar_profKeyReleased

    private void buton_adicionar_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buton_adicionar_profMouseClicked
     if(VerificaDadosCorretos()){
        if(VerificaseaIgual()){
         CadatrarProfessor();
         JOptionPane.showMessageDialog(null, "Cadastrado com sucesso!");  
         limpaDadosADD();
     }else{
         JOptionPane.showMessageDialog(null, "Este Professor ja se encontra cadastrado!");
     }
     }else{
         JOptionPane.showMessageDialog(null, "Dados Incorretos");
     }
     
    }//GEN-LAST:event_buton_adicionar_profMouseClicked

    private void buton_deletar_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buton_deletar_profMouseClicked
     int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente excluir este professor?",
                "Confirmação", JOptionPane.YES_NO_OPTION);

        if (resp == JOptionPane.YES_NO_OPTION) {
            try {
                profmet.DeletarProfessor(id_deste);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(null, "Excluído com sucesso!");
             buttonGroup1.clearSelection();
        DesabilitaALTDEL();
        DesabilitaADD();
        }
        
       
    }//GEN-LAST:event_buton_deletar_profMouseClicked

    private void buton_editar_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buton_editar_profMouseClicked
if(VerificaDadosCorretosALTDEL()){      
    AlterarProfessor(id_deste);

         
    
}else{
    JOptionPane.showMessageDialog(null, "Dados Incorretos");
}
    }//GEN-LAST:event_buton_editar_profMouseClicked

    private void JLDisc1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc1MouseClicked
if(jRB_adicionar_prof.isSelected()){
             if(disc1_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc1_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc1_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc1_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc1_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc1_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc1_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc1_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc1_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc1_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc1_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc1_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc1_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc1_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc1_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc1_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc1_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc1_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc1_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc1_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc1_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc1_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc1_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc1_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc1_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc1_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
    disc1_prof.setText("");
}else{
        disc1_prof.setText("Clique aqui para adicionar uma disciplina");
}
    }//GEN-LAST:event_JLDisc1MouseClicked

    private void JLDisc2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc2MouseClicked
    if(jRB_adicionar_prof.isSelected()){
         if(disc2_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc2_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc2_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc2_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc2_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc2_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc2_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc2_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc2_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc2_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc2_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc2_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc2_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc2_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc2_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc2_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc2_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc2_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc2_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc2_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc2_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc2_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc2_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc2_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc2_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc2_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
        disc2_prof.setText("");
}else{
        disc2_prof.setText("Clique aqui para adicionar uma disciplina");
    }
    }//GEN-LAST:event_JLDisc2MouseClicked

    private void JLDisc3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc3MouseClicked
     if(jRB_adicionar_prof.isSelected()){
         
         if(disc3_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc3_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc3_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc3_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc3_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc3_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc3_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc3_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc3_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc3_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc3_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc3_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc3_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc3_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc3_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc3_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc3_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc3_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc3_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc3_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc3_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc3_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc3_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc3_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc3_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc3_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
         
         disc3_prof.setText("");
}else{
         disc3_prof.setText("Clique aqui para adicionar uma disciplina");
     }
    }//GEN-LAST:event_JLDisc3MouseClicked

    private void JLDisc4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc4MouseClicked
if(jRB_adicionar_prof.isSelected()){
             if(disc4_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc4_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc4_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc4_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc4_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc4_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc4_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc4_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc4_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc4_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc4_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc4_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc4_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc4_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc4_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc4_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc4_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc4_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc4_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc4_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc4_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc4_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc4_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc4_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc4_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc4_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
    disc4_prof.setText("");
}else{
    disc4_prof.setText("Clique aqui para adicionar uma disciplina");
}       
    }//GEN-LAST:event_JLDisc4MouseClicked

    private void JLR_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLR_profMouseClicked
      EixoR_prof.setText("");
    }//GEN-LAST:event_JLR_profMouseClicked

    private void JLP_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLP_profMouseClicked
       EixoP_prof.setText("");
    }//GEN-LAST:event_JLP_profMouseClicked

    private void disc1_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc1_profMouseClicked
          if("Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())){
            qwe=1;
AbilitaBuscarMaterias();
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc1_profMouseClicked

    private void disc2_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc2_profMouseClicked
      if("Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText())){
            qwe=2;
AbilitaBuscarMaterias();
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc2_profMouseClicked

    private void disc3_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc3_profMouseClicked
       if("Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())){
          qwe=3;
AbilitaBuscarMaterias();  
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc3_profMouseClicked

    private void disc4_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc4_profMouseClicked
if("Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())){
          qwe=4;
AbilitaBuscarMaterias();  
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
jDialog2.setVisible(true);
        }       
    }//GEN-LAST:event_disc4_profMouseClicked

    private void JTF_Pesquisarmaterias_profKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisarmaterias_profKeyReleased
       AbilitaBuscarMaterias();
    }//GEN-LAST:event_JTF_Pesquisarmaterias_profKeyReleased

    private void disc5_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc5_profMouseClicked
      if("Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())){
          qwe=5;
AbilitaBuscarMaterias();  
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
jDialog2.setVisible(true);
        }       
    }//GEN-LAST:event_disc5_profMouseClicked

    private void JLDisc5_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc5_profMouseClicked
      if(jRB_adicionar_prof.isSelected()){
         if(disc5_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc5_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc5_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc5_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc5_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc5_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc5_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc5_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc5_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc5_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc5_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc5_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc5_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc5_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc5_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc5_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc5_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc5_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc5_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc5_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc5_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc5_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc5_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc5_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc5_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc5_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
          disc5_prof.setText("");
}else{
          disc5_prof.setText("Clique aqui para adicionar uma disciplina");
      }   
    }//GEN-LAST:event_JLDisc5_profMouseClicked

    private void JTF_Pesquisarmaterias1_profKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisarmaterias1_profKeyReleased
       AbilitaBuscarDiscCurso();
    }//GEN-LAST:event_JTF_Pesquisarmaterias1_profKeyReleased

    private void JTF_Pesquisarmaterias1_prof_regKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisarmaterias1_prof_regKeyReleased
        AbilitaBuscarDiscReg(); 
    }//GEN-LAST:event_JTF_Pesquisarmaterias1_prof_regKeyReleased

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
       
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new FormProfessor().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField EixoP_prof;
    private javax.swing.JTextField EixoR_prof;
    private javax.swing.JLabel JLA1;
    private javax.swing.JLabel JLA2;
    private javax.swing.JLabel JLA3;
    private javax.swing.JLabel JLB1;
    private javax.swing.JLabel JLB2;
    private javax.swing.JLabel JLB3;
    private javax.swing.JLabel JLC1;
    private javax.swing.JLabel JLC2;
    private javax.swing.JLabel JLC3;
    private javax.swing.JLabel JLD1;
    private javax.swing.JLabel JLD2;
    private javax.swing.JLabel JLD3;
    private javax.swing.JLabel JLDisc1;
    private javax.swing.JLabel JLDisc2;
    private javax.swing.JLabel JLDisc3;
    private javax.swing.JLabel JLDisc4;
    private javax.swing.JLabel JLDisc5_prof;
    private javax.swing.JLabel JLE1;
    private javax.swing.JLabel JLE2;
    private javax.swing.JLabel JLE3;
    private javax.swing.JLabel JLF1;
    private javax.swing.JLabel JLF2;
    private javax.swing.JLabel JLF3;
    private javax.swing.JLabel JLG1;
    private javax.swing.JLabel JLG2;
    private javax.swing.JLabel JLG3;
    private javax.swing.JLabel JLH1;
    private javax.swing.JLabel JLH2;
    private javax.swing.JLabel JLH3;
    private javax.swing.JLabel JLP_prof;
    private javax.swing.JLabel JLR_prof;
    private javax.swing.JTextField JTF_Pesquisar_prof;
    private javax.swing.JTextField JTF_Pesquisarmaterias1_prof;
    private javax.swing.JTextField JTF_Pesquisarmaterias1_prof_reg;
    private javax.swing.JTextField JTF_Pesquisarmaterias_prof;
    private javax.swing.JLabel buton_adicionar_prof;
    private javax.swing.JLabel buton_deletar_prof;
    private javax.swing.JLabel buton_editar_prof;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JLabel desmarcar;
    private javax.swing.JTextField disc1_prof;
    private javax.swing.JTextField disc2_prof;
    private javax.swing.JTextField disc3_prof;
    private javax.swing.JTextField disc4_prof;
    private javax.swing.JTextField disc5_prof;
    private javax.swing.JDesktopPane jDesktopPane1_prof;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JDialog jDialog2;
    private javax.swing.JDialog jDialog3;
    private javax.swing.JDialog jDialog4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2_prof;
    private javax.swing.JPanel jPanel1_prof;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JRadioButton jRB_adicionar_prof;
    private javax.swing.JRadioButton jRB_edt_del_prof;
    private javax.swing.JRadioButton jRB_profissional_prof;
    private javax.swing.JRadioButton jRB_regular_prof;
    private javax.swing.JScrollPane jScrollPane1_prof;
    private javax.swing.JScrollPane jScrollPane2_prof;
    private javax.swing.JScrollPane jScrollPane3_prof;
    private javax.swing.JScrollPane jScrollPane4_prof;
    private javax.swing.JScrollPane jScrollPane5_prof;
    private javax.swing.JScrollPane jScrollPane5_prof1;
    private javax.swing.JSeparator jSeparator1_prof;
    private javax.swing.JTextField jTF_Carga_horaria_prof;
    private javax.swing.JTextField jTF_nome_prof;
    private javax.swing.JTable jTTabela_Disc1_prof;
    private javax.swing.JTable jTTabela_Disc1_prof_reg;
    private javax.swing.JTable jTTabela_Disc_prof;
    private javax.swing.JTable jTTabela_Prof_prof;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JLabel jl_Pesquisar1_prof;
    private javax.swing.JLabel jl_Pesquisar2_prof;
    private javax.swing.JLabel jl_Pesquisar2_prof1;
    private javax.swing.JLabel jl_Pesquisar_prof;
    private javax.swing.JLabel jl_aulas_prof;
    private javax.swing.JLabel jl_carga_horaria_prof;
    private javax.swing.JLabel jl_disciplina_prof;
    private javax.swing.JLabel jl_eixo_prof;
    private javax.swing.JLabel jl_nome_prof;
    private javax.swing.JLabel jl_serie_prof;
    private javax.swing.JLabel jl_turma_prof;
    private javax.swing.JLabel marcar;
    private javax.swing.JTextField serie1_prof;
    private javax.swing.JTextField serie2_prof;
    private javax.swing.JTextField serie3_prof;
    private javax.swing.JTextField serieA1;
    private javax.swing.JTextField serieA2;
    private javax.swing.JTextField serieA3;
    private javax.swing.JTextField serieB1;
    private javax.swing.JTextField serieB2;
    private javax.swing.JTextField serieB3;
    private javax.swing.JTextField serieC1;
    private javax.swing.JTextField serieC2;
    private javax.swing.JTextField serieC3;
    private javax.swing.JTextField serieD1;
    private javax.swing.JTextField serieD2;
    private javax.swing.JTextField serieD3;
    private javax.swing.JTextField serieE1;
    private javax.swing.JTextField serieE2;
    private javax.swing.JTextField serieE3;
    private javax.swing.JTextField serieF1;
    private javax.swing.JTextField serieF2;
    private javax.swing.JTextField serieF3;
    private javax.swing.JTextField serieG1;
    private javax.swing.JTextField serieG2;
    private javax.swing.JTextField serieG3;
    private javax.swing.JTextField serieH1;
    private javax.swing.JTextField serieH2;
    private javax.swing.JTextField serieH3;
    private org.netbeans.examples.lib.timerbean.Timer timer1;
    // End of variables declaration//GEN-END:variables

    private void DesabilitaADD () {
        timer1.stop();
        buton_adicionar_prof.setVisible(false);
        jl_nome_prof.setVisible(false);
        jl_carga_horaria_prof.setVisible(false);
        jLabel2_prof.setVisible(false);
        jTF_Carga_horaria_prof.setVisible(false);
        jTF_nome_prof.setVisible(false);
        jLabel1.setVisible(false);
        jl_eixo_prof.setVisible(false);
        jl_disciplina_prof.setVisible(false);
        jRB_profissional_prof.setVisible(false);
        jRB_regular_prof.setVisible(false);
        disc1_prof.setVisible(false);
        disc2_prof.setVisible(false);
        disc3_prof.setVisible(false);
        disc4_prof.setVisible(false);
        disc5_prof.setVisible(false);
        jl_aulas_prof.setVisible(false);
        desmarcar.setVisible(false);
        marcar.setVisible(false);
        jScrollPane1_prof.setVisible(false);
        jTable2.setVisible(false);
        jTable1.setVisible(false);
        jScrollPane4_prof.setVisible(false);
        jl_serie_prof.setVisible(false);
        jl_turma_prof.setVisible(false);
        serie1_prof.setVisible(false);
        serie2_prof.setVisible(false);
        serie3_prof.setVisible(false);
        serieA1.setVisible(false);
        serieA2.setVisible(false);
        serieA3.setVisible(false);
        serieA1.setVisible(false);
        serieA2.setVisible(false);
        serieA3.setVisible(false);
        serieB1.setVisible(false);
        serieB2.setVisible(false);
        serieB3.setVisible(false);
        serieC1.setVisible(false);
        serieC2.setVisible(false);
        serieC3.setVisible(false);
        serieD1.setVisible(false);
        serieD2.setVisible(false);
        serieD3.setVisible(false);
        serieE1.setVisible(false);
        serieE2.setVisible(false);
        serieE3.setVisible(false);
        serieF1.setVisible(false);
        serieF2.setVisible(false);
        serieF3.setVisible(false);
        serieG1.setVisible(false);
        serieG2.setVisible(false);
        serieG3.setVisible(false);
        serieH1.setVisible(false);
        serieH2.setVisible(false);
        serieH3.setVisible(false);
        JLA1.setVisible(false);
        JLA2.setVisible(false);
        JLA3.setVisible(false);
        JLB1.setVisible(false);
        JLB2.setVisible(false);
        JLB3.setVisible(false);
        JLC1.setVisible(false);
        JLC2.setVisible(false);
        JLC3.setVisible(false);
        JLD1.setVisible(false);
        JLD2.setVisible(false);
        JLD3.setVisible(false);
        JLE1.setVisible(false);
        JLE2.setVisible(false);
        JLE3.setVisible(false);
        JLF1.setVisible(false);
        JLF2.setVisible(false);
        JLF3.setVisible(false);
        JLG1.setVisible(false);
        JLG2.setVisible(false);
        JLG3.setVisible(false);
        JLH1.setVisible(false);
        JLH2.setVisible(false);
        JLH3.setVisible(false);
        JLDisc1.setVisible(false);
       JLDisc2.setVisible(false);
       JLDisc3.setVisible(false);
       JLDisc4.setVisible(false);
       JLDisc5_prof.setVisible(false);
        
    }
    
    private void DesabilitaALTDEL() {
        buton_deletar_prof.setVisible(false);
        buton_editar_prof.setVisible(false);
        JLR_prof.setVisible(false);
        JLP_prof.setVisible(false);
        JLDisc1.setVisible(false);
        JLDisc2.setVisible(false);
        JLDisc3.setVisible(false);
        JLDisc4.setVisible(false);
        JLDisc5_prof.setVisible(false);
        EixoP_prof.setVisible(false);
        EixoR_prof.setVisible(false);
    }

    private void ChamaEscolha(String escolha) {
        if("Adicionar".equals(escolha)){
       
        buton_adicionar_prof.setVisible(true);
        jl_nome_prof.setVisible(true);
        jl_carga_horaria_prof.setVisible(true);
        jLabel2_prof.setVisible(true);
        jTF_Carga_horaria_prof.setVisible(true);
        jTF_nome_prof.setVisible(true);
        jLabel1.setVisible(true);
        jl_eixo_prof.setVisible(true);
        jl_disciplina_prof.setVisible(true);
        jRB_profissional_prof.setVisible(true);
        jRB_regular_prof.setVisible(true);
        disc1_prof.setVisible(true);
        disc2_prof.setVisible(true);
        disc3_prof.setVisible(true);
        disc4_prof.setVisible(true);
        disc5_prof.setVisible(true);
        jl_aulas_prof.setVisible(true);
        desmarcar.setVisible(true);
        marcar.setVisible(true);
        jScrollPane1_prof.setVisible(true);
        jTable2.setVisible(true);
        jTable1.setVisible(true);
        jScrollPane4_prof.setVisible(true);
        jl_serie_prof.setVisible(true);
        jl_turma_prof.setVisible(true);
        JLDisc1.setVisible(true);
       JLDisc2.setVisible(true);
       JLDisc3.setVisible(true);
       JLDisc4.setVisible(true);
       JLDisc5_prof.setVisible(true);
       marcarMouseClicked(null);
       desmarcarMouseClicked(null);
        timer1.start();
        }else if("<HTML>Editar<br><br>Deletar".equals(escolha)){
        jl_nome_prof.setVisible(true);
        jl_carga_horaria_prof.setVisible(true);
        jLabel2_prof.setVisible(true);
        jTF_Carga_horaria_prof.setVisible(true);
        jTF_nome_prof.setVisible(true);
        jLabel1.setVisible(true);
        jl_eixo_prof.setVisible(true);
        jl_disciplina_prof.setVisible(true);
        EixoR_prof.setVisible(true);
        EixoP_prof.setVisible(true);
        buton_deletar_prof.setVisible(true);
        buton_editar_prof.setVisible(true);
        disc1_prof.setVisible(true);
        disc2_prof.setVisible(true);
        disc3_prof.setVisible(true);
        disc4_prof.setVisible(true);
        disc5_prof.setVisible(true);
        disc1_prof.setText("Clique aqui para adicionar uma disciplina");
        disc2_prof.setText("Clique aqui para adicionar uma disciplina");
        disc3_prof.setText("Clique aqui para adicionar uma disciplina");
        disc4_prof.setText("Clique aqui para adicionar uma disciplina");
        disc5_prof.setText("Clique aqui para adicionar uma disciplina");
        jl_aulas_prof.setVisible(true);
        desmarcar.setVisible(true);
        marcar.setVisible(true);
        jScrollPane1_prof.setVisible(true);
        jTable2.setVisible(true);
        jTable1.setVisible(true);
        jScrollPane4_prof.setVisible(true);
        jl_serie_prof.setVisible(true);
        jl_turma_prof.setVisible(true);
       marcarMouseClicked(null);
       desmarcarMouseClicked(null);
       JLDisc1.setVisible(true);
       JLDisc2.setVisible(true);
       JLDisc3.setVisible(true);
       JLDisc4.setVisible(true);
       JLDisc5_prof.setVisible(true);
       JLR_prof.setVisible(true);
       JLP_prof.setVisible(true);

        }
    }

    private void disc1() {
   
     //       alocação do disc1  
        
         if(!"".equals(d1) && "".equals(disc11) && !disc22.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1) && !disc55.equals(d1)){
           disc1_prof.setText(d1);
           asd=d1;
       }else if(!"".equals(d2) && "".equals(disc11) && !disc22.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2) && !disc55.equals(d2)){
           disc1_prof.setText(d2);
           asd=d2;
       }else if(!"".equals(d3) && "".equals(disc11)&& !disc22.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3) && !disc55.equals(d3)){
           disc1_prof.setText(d3);
           asd=d3;
       }else if(!"".equals(d4) && "".equals(disc11)&& !disc22.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4) && !disc55.equals(d4)){
           disc1_prof.setText(d4);
           asd=d4;
       }else if(!"".equals(d5) && "".equals(disc11)&& !disc22.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5) && !disc55.equals(d5)){
           disc1_prof.setText(d5);
           asd=d5;
       }else if(!"".equals(d6) && "".equals(disc11)&& !disc22.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6) && !disc55.equals(d6)){
           disc1_prof.setText(d6);
           asd=d6;
       }else if(!"".equals(d7) && "".equals(disc11)&& !disc22.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7) && !disc55.equals(d7)){
           disc1_prof.setText(d7);
           asd=d7;
       }else if(!"".equals(d8) && "".equals(disc11)&& !disc22.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8) && !disc55.equals(d8)){
           disc1_prof.setText(d8);
           asd=d8;
       }else if(!"".equals(d9) && "".equals(disc11)&& !disc22.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9) && !disc55.equals(d9)){
           disc1_prof.setText(d9);
           asd=d9;
       }else if(!"".equals(d10) && "".equals(disc11)&& !disc22.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10) && !disc55.equals(d10)){
           disc1_prof.setText(d10);
           asd=d10;
       }else if(!"".equals(d11) && "".equals(disc11)&& !disc22.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11) && !disc55.equals(d11)){
           disc1_prof.setText(d11);
           asd=d11;
       }else if(!"".equals(d12) && "".equals(disc11)&& !disc22.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12) && !disc55.equals(d12)){
           disc1_prof.setText(d12);
           asd=d12;
       }else if(!"".equals(d13) && "".equals(disc11)&& !disc22.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13) && !disc55.equals(d13)){
           disc1_prof.setText(d13);
           asd=d13;
       }else if(!"".equals(d14) && "".equals(disc11)&& !disc22.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14) && !disc55.equals(d14)){
           disc1_prof.setText(d14);
           asd=d14;
       }else if(!"".equals(d15) && "".equals(disc11)&& !disc22.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15) && !disc55.equals(d15)){
           disc1_prof.setText(d15);
           asd=d15;
       }else if(!"".equals(d16) && "".equals(disc11)&& !disc22.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16) && !disc55.equals(d16)){
           disc1_prof.setText(d16);
           asd=d16;
       }else if(!"".equals(d17) && "".equals(disc11)&& !disc22.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17) && !disc55.equals(d17)){
           disc1_prof.setText(d17);
           asd=d17;
       }else if(!"".equals(d18) && "".equals(disc11)&& !disc22.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18) && !disc55.equals(d18)){
           disc1_prof.setText(d18);
           asd=d18;
       }else if(!"".equals(d19) && "".equals(disc11)&& !disc22.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19) && !disc55.equals(d19)){
           disc1_prof.setText(d19);
           asd=d19;
       }else if(!"".equals(d20) && "".equals(disc11)&& !disc22.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20) && !disc55.equals(d20)){
           disc1_prof.setText(d20);
           asd=d20;
       }else if(!"".equals(d21) && "".equals(disc11)&& !disc22.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21) && !disc55.equals(d21)){
           disc1_prof.setText(d21);
           asd=d21;
       }else if(!"".equals(d22) && "".equals(disc11)&& !disc22.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22) && !disc55.equals(d22)){
           disc1_prof.setText(d22);
           asd=d22;
       }else if(!"".equals(d23) && "".equals(disc11)&& !disc22.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23) && !disc55.equals(d23)){
           disc1_prof.setText(d23);
           asd=d23;
       }else if(!"".equals(d24) && "".equals(disc11)&& !disc22.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24) && !disc55.equals(d24)){
           disc1_prof.setText(d24);
           asd=d24;
       }else if(!"".equals(d25) && "".equals(disc11)&& !disc22.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25) && !disc55.equals(d25)){
           disc1_prof.setText(d25);
           asd=d25;
       }else if(!"".equals(d26) && "".equals(disc11)&& !disc22.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26) && !disc55.equals(d26)){
           disc1_prof.setText(d26);
           asd=d26;
       }
         
         
         
      
       //     Alocaçao de apagar
else if("".equals(d1) && a==1 && disc11.equals(Porenquanto.getM1ant())){
           disc1_prof.setText("");
}else if("".equals(d2) && b==1 && disc11.equals(Porenquanto.getM2ant())){
           disc1_prof.setText("");    
}else if("".equals(d3) && c==1 && disc11.equals(Porenquanto.getM3ant())){
           disc1_prof.setText("");    
}else if("".equals(d4) && d==1 && disc11.equals(Porenquanto.getM4ant())){
           disc1_prof.setText("");    
}else if("".equals(d5) && e==1 && disc11.equals(Porenquanto.getM5ant())){
           disc1_prof.setText("");    
}else if("".equals(d6) && f==1 && disc11.equals(Porenquanto.getM6ant())){
           disc1_prof.setText("");    
}else if("".equals(d7) && g==1 && disc11.equals(Porenquanto.getM7ant())){
           disc1_prof.setText("");    
}else if("".equals(d8) && h==1 && disc11.equals(Porenquanto.getM8ant())){
           disc1_prof.setText("");    
}else if("".equals(d9) && i==1 && disc11.equals(Porenquanto.getM9ant())){
           disc1_prof.setText("");    
}else if("".equals(d10) && j==1 && disc11.equals(Porenquanto.getM10ant())){
           disc1_prof.setText("");    
}else if("".equals(d11) && k==1 && disc11.equals(Porenquanto.getM11ant())){
           disc1_prof.setText("");    
}else if("".equals(d12) && l==1 && disc11.equals(Porenquanto.getM12ant())){
           disc1_prof.setText("");    
}else if("".equals(d13) && m==1 && disc11.equals(Porenquanto.getM13ant())){
           disc1_prof.setText("");    
}else if("".equals(d14) && n==1 && disc11.equals(Porenquanto.getM14ant())){
           disc1_prof.setText("");    
}else if("".equals(d15) && o==1 && disc11.equals(Porenquanto.getM15ant())){
           disc1_prof.setText("");    
}else if("".equals(d16) && p==1 && disc11.equals(Porenquanto.getM16ant())){
           disc1_prof.setText("");    
}else if("".equals(d17) && q==1 && disc11.equals(Porenquanto.getM17ant())){
           disc1_prof.setText("");    
}else if("".equals(d18) && r==1 && disc11.equals(Porenquanto.getM18ant())){
           disc1_prof.setText("");    
}else if("".equals(d19) && s==1 && disc11.equals(Porenquanto.getM19ant())){
           disc1_prof.setText("");    
}else if("".equals(d20) && t==1 && disc11.equals(Porenquanto.getM20ant())){
           disc1_prof.setText("");    
}else if("".equals(d21) && u==1 && disc11.equals(Porenquanto.getM21ant())){
           disc1_prof.setText("");    
}else if("".equals(d22) && v==1 && disc11.equals(Porenquanto.getM22ant())){
           disc1_prof.setText("");    
}else if("".equals(d23) && w==1 && disc11.equals(Porenquanto.getM23ant())){
           disc1_prof.setText("");    
}else if("".equals(d24) && x==1 && disc11.equals(Porenquanto.getM24ant())){
           disc1_prof.setText("");    
}else if("".equals(d25) && y==1 && disc11.equals(Porenquanto.getM25ant())){
           disc1_prof.setText("");    
}else if("".equals(d26) && z==1 && disc11.equals(Porenquanto.getM26ant())){
           disc1_prof.setText("");    
}  
         
         
 
    }

    private void disc2() {
        
 if("".equals(disc22) && !asd.equals(d1)  && !"".equals(disc11) && !"".equals(d1)&& !disc11.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1)  && !disc55.equals(d1)){
           disc2_prof.setText(d1);
           asd2=d1;
       }else if("".equals(disc22) && !"".equals(disc11) && !asd.equals(d2)  && !"".equals(d2)&& !disc11.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2) && !disc55.equals(d2)){
           disc2_prof.setText(d2);
           asd2=d2;
       }else if("".equals(disc22) && !asd.equals(d3) && !"".equals(disc11)&& !"".equals(d3)&& !disc11.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3) && !disc55.equals(d3)){
           disc2_prof.setText(d3);  
           asd2=d3;
       }else if("".equals(disc22) && !asd.equals(d4) && !"".equals(disc11) && !"".equals(d4)&& !disc11.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4) && !disc55.equals(d4)){
           disc2_prof.setText(d4);
           asd2=d4;
       }else if("".equals(disc22) && !asd.equals(d5) && !"".equals(disc11)&& !"".equals(d5)&& !disc11.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5) && !disc55.equals(d5)){
           disc2_prof.setText(d5);
           asd2=d5;
       }else if("".equals(disc22) && !asd.equals(d6) && !"".equals(disc11)&& !"".equals(d6)&& !disc11.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6) && !disc55.equals(d6)){
           disc2_prof.setText(d6);
           asd2=d6;
       }else if("".equals(disc22) && !asd.equals(d7) && !"".equals(disc11)&& !"".equals(d7)&& !disc11.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7) && !disc55.equals(d7)){
           disc2_prof.setText(d7);
           asd2=d7;
       }else if("".equals(disc22) && !asd.equals(d8) && !d8.equals(disc11) && !"".equals(disc11)&& !"".equals(d8)&& !disc11.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8) && !disc55.equals(d8)){
           disc2_prof.setText(d8);
           asd2=d8;
       }else if("".equals(disc22) && !asd.equals(d9) && !d9.equals(disc11) && !"".equals(disc11)&& !"".equals(d9)&& !disc11.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9) && !disc55.equals(d9)){
           disc2_prof.setText(d9);
           asd2=d9;
       }else if("".equals(disc22) && !asd.equals(d10) && !d10.equals(disc11) && !"".equals(disc11)&& !"".equals(d10)&& !disc11.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10) && !disc55.equals(d10)){
           disc2_prof.setText(d10);
           asd2=d10;
       }else if("".equals(disc22) && !asd.equals(d11) && !d11.equals(disc11) && !"".equals(disc11)&& !"".equals(d11)&& !disc11.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11) && !disc55.equals(d11)){
           disc2_prof.setText(d11);
           asd2=d11;
       }else if("".equals(disc22) && !asd.equals(d12) && !d12.equals(disc11) && !"".equals(disc11)&& !"".equals(d12)&& !disc11.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12) && !disc55.equals(d12)){
           disc2_prof.setText(d12);
           asd2=d12;
       }else if("".equals(disc22) && !asd.equals(d13) && !d13.equals(disc11) && !"".equals(disc11)&& !"".equals(d13)&& !disc11.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13) && !disc55.equals(d13)){
           disc2_prof.setText(d13);
           asd2=d13;
       }else if("".equals(disc22) && !asd.equals(d14) && !d14.equals(disc11) && !"".equals(disc11)&& !"".equals(d14)&& !disc11.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14) && !disc55.equals(d14)){
           disc2_prof.setText(d14);
           asd2=d14;
       }else if("".equals(disc22) && !asd.equals(d15) && !d15.equals(disc11) && !"".equals(disc11)&& !"".equals(d15)&& !disc11.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15) && !disc55.equals(d15)){
           disc2_prof.setText(d15);
           asd2=d15;
       }else if("".equals(disc22) && !asd.equals(d16) && !d16.equals(disc11) && !"".equals(disc11)&& !"".equals(d16)&& !disc11.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16) && !disc55.equals(d16)){
           disc2_prof.setText(d16);
           asd2=d16;
       }else if("".equals(disc22) && !asd.equals(d17) && !d17.equals(disc11) && !"".equals(disc11)&& !"".equals(d17)&& !disc11.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17) && !disc55.equals(d17)){
           disc2_prof.setText(d17);
           asd2=d17;
       }else if("".equals(disc22) && !asd.equals(d18) && !d18.equals(disc11) && !"".equals(disc11)&& !"".equals(d18)&& !disc11.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18) && !disc55.equals(d18)){
           disc2_prof.setText(d18);
           asd2=d18;
       }else if("".equals(disc22) && !asd.equals(d19) && !d19.equals(disc11) && !"".equals(disc11)&& !"".equals(d19)&& !disc11.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19) && !disc55.equals(d19)){
           disc2_prof.setText(d19);
           asd2=d19;
       }else if("".equals(disc22) && !asd.equals(d20) && !d20.equals(disc11) && !"".equals(disc11)&& !"".equals(d20)&& !disc11.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20) && !disc55.equals(d20)){
           disc2_prof.setText(d20);
           asd2=d20;
       }else if("".equals(disc22) && !asd.equals(d21) && !d21.equals(disc11) && !"".equals(disc11)&& !"".equals(d21)&& !disc11.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21) && !disc55.equals(d21)){
           disc2_prof.setText(d21);
           asd2=d21;
       }else if("".equals(disc22) && !asd.equals(d22) && !d22.equals(disc11) && !"".equals(disc11)&& !"".equals(d22)&& !disc11.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22) && !disc55.equals(d22)){
           disc2_prof.setText(d22);
           asd2=d22;
       }else if("".equals(disc22) && !asd.equals(d23) && !d23.equals(disc11) && !"".equals(disc11)&& !"".equals(d23)&& !disc11.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23) && !disc55.equals(d23)){
           disc2_prof.setText(d23);
           asd2=d23;
       }else if("".equals(disc22) && !asd.equals(d24) && !d24.equals(disc11) && !"".equals(disc11)&& !"".equals(d24)&& !disc11.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24) && !disc55.equals(d24)){
           disc2_prof.setText(d24);
           asd2=d24;
       }else if("".equals(disc22) && !asd.equals(d25) && !d25.equals(disc11) && !"".equals(disc11)&& !"".equals(d25)&& !disc11.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25) && !disc55.equals(d25)){
           disc2_prof.setText(d25);
           asd2=d25;
       }else if("".equals(disc22) && !asd.equals(d26) && !d26.equals(disc11) && !"".equals(disc11)&& !"".equals(d26)&& !disc11.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26) && !disc55.equals(d26)){
           disc2_prof.setText(d26);
           asd2=d26;
       }        

        
        
    
        
 if("".equals(d1) && a==1 && disc22.equals(Porenquanto.getM1ant())){
           disc2_prof.setText("");
}else if("".equals(d2) && b==1 && disc22.equals(Porenquanto.getM2ant())){
           disc2_prof.setText("");    
}else if("".equals(d3) && c==1 && disc22.equals(Porenquanto.getM3ant())){
           disc2_prof.setText("");    
}else if("".equals(d4) && d==1 && disc22.equals(Porenquanto.getM4ant())){
           disc2_prof.setText("");    
}else if("".equals(d5) && e==1 && disc22.equals(Porenquanto.getM5ant())){
           disc2_prof.setText("");    
}else if("".equals(d6) && f==1 && disc22.equals(Porenquanto.getM6ant())){
           disc2_prof.setText("");    
}else if("".equals(d7) && g==1 && disc22.equals(Porenquanto.getM7ant())){
           disc2_prof.setText("");   
}else if("".equals(d8) && h==1 && disc22.equals(Porenquanto.getM8ant())){
           disc2_prof.setText("");    
}else if("".equals(d9) && i==1 && disc22.equals(Porenquanto.getM9ant())){
           disc2_prof.setText("");    
}else if("".equals(d10) && j==1 && disc22.equals(Porenquanto.getM10ant())){
           disc2_prof.setText("");    
}else if("".equals(d11) && k==1 && disc22.equals(Porenquanto.getM11ant())){
           disc2_prof.setText("");    
}else if("".equals(d12) && l==1 && disc22.equals(Porenquanto.getM12ant())){
           disc2_prof.setText("");    
}else if("".equals(d13) && m==1 && disc22.equals(Porenquanto.getM13ant())){
           disc2_prof.setText("");    
}else if("".equals(d14) && n==1 && disc22.equals(Porenquanto.getM14ant())){
           disc2_prof.setText("");    
}else if("".equals(d15) && o==1 && disc22.equals(Porenquanto.getM15ant())){
           disc2_prof.setText("");    
}else if("".equals(d16) && p==1 && disc22.equals(Porenquanto.getM16ant())){
           disc2_prof.setText("");    
}else if("".equals(d17) && q==1 && disc22.equals(Porenquanto.getM17ant())){
           disc2_prof.setText("");    
}else if("".equals(d17) && r==1 && disc22.equals(Porenquanto.getM18ant())){
           disc2_prof.setText("");    
}else if("".equals(d19) && s==1 && disc22.equals(Porenquanto.getM19ant())){
           disc2_prof.setText("");    
}else if("".equals(d20) && t==1 && disc22.equals(Porenquanto.getM20ant())){
           disc2_prof.setText("");    
}else if("".equals(d21) && u==1 && disc22.equals(Porenquanto.getM21ant())){
           disc2_prof.setText("");    
}else if("".equals(d22) && v==1 && disc22.equals(Porenquanto.getM22ant())){
           disc2_prof.setText("");    
}else if("".equals(d23) && w==1 && disc22.equals(Porenquanto.getM23ant())){
           disc2_prof.setText("");    
}else if("".equals(d24) && x==1 && disc22.equals(Porenquanto.getM24ant())){
           disc2_prof.setText("");    
}else if("".equals(d25) && y==1 && disc22.equals(Porenquanto.getM25ant())){
           disc2_prof.setText("");    
}else if("".equals(d26) && z==1 && disc22.equals(Porenquanto.getM26ant())){
           disc2_prof.setText("");    
}
    }

    private void disc3() {
         if("".equals(disc33) && !asd.equals(d1) && !asd2.equals(d1) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1)&& !disc11.equals(d1) && !disc22.equals(d1) && !disc44.equals(d1) && !disc55.equals(d1)){
           disc3_prof.setText(d1);
           asd3=d1;
       }else if("".equals(disc33)  &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2)&& !disc11.equals(d2) && !disc22.equals(d2) && !disc44.equals(d2) && !disc55.equals(d2) ){
           disc3_prof.setText(d2);
           asd3=d2;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3)&& !disc11.equals(d3) && !disc22.equals(d3) && !disc44.equals(d3) && !disc55.equals(d3)){
           disc3_prof.setText(d3);
           asd3=d3;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4)&& !disc11.equals(d4) && !disc22.equals(d4) && !disc44.equals(d4) && !disc55.equals(d4)){
           disc3_prof.setText(d4);
           asd3=d4;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5)&& !disc11.equals(d5) && !disc22.equals(d5) && !disc44.equals(d5) && !disc55.equals(d5)){
           disc3_prof.setText(d5);
           asd3=d5;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6)&& !disc11.equals(d6) && !disc22.equals(d6) && !disc44.equals(d6) && !disc55.equals(d6)){
           disc3_prof.setText(d6);
           asd3=d6;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7)&& !disc11.equals(d7) && !disc22.equals(d7) && !disc44.equals(d7) && !disc55.equals(d7)){
           disc3_prof.setText(d7);
           asd3=d7;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8)&& !disc11.equals(d8) && !disc22.equals(d8) && !disc44.equals(d8) && !disc55.equals(d8)){
           disc3_prof.setText(d8);
           asd3=d8;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9)&& !disc11.equals(d9) && !disc22.equals(d9) && !disc44.equals(d9) && !disc55.equals(d9)){
           disc3_prof.setText(d9);
           asd3=d9;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10)&& !disc11.equals(d10) && !disc22.equals(d10) && !disc44.equals(d10) && !disc55.equals(d10)){
           disc3_prof.setText(d10);
           asd3=d10;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11)&& !disc11.equals(d11) && !disc22.equals(d11) && !disc44.equals(d11) && !disc55.equals(d11)){
           disc3_prof.setText(d11);
           asd3=d11;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12)&& !disc11.equals(d12) && !disc22.equals(d12) && !disc44.equals(d12) && !disc55.equals(d12)){
           disc3_prof.setText(d12);
           asd3=d12;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13)&& !disc11.equals(d13) && !disc22.equals(d13) && !disc44.equals(d13) && !disc55.equals(d13)){
           disc3_prof.setText(d13);
           asd3=d13;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14)&& !disc11.equals(d14) && !disc22.equals(d14) && !disc44.equals(d14) && !disc55.equals(d14)){
           disc3_prof.setText(d14);
           asd3=d14;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15)&& !disc11.equals(d15) && !disc22.equals(d15) && !disc44.equals(d15) && !disc55.equals(d15)){
           disc3_prof.setText(d15);
           asd3=d15;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16)&& !disc11.equals(d16) && !disc22.equals(d16) && !disc44.equals(d16) && !disc55.equals(d16)){
           disc3_prof.setText(d16);
           asd3=d16;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17)&& !disc11.equals(d17) && !disc22.equals(d17) && !disc44.equals(d17) && !disc55.equals(d17)){
           disc3_prof.setText(d17);
           asd3=d17;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18)&& !disc11.equals(d18) && !disc22.equals(d18) && !disc44.equals(d18) && !disc55.equals(d18)){
           disc3_prof.setText(d18);
           asd3=d18;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19)&& !disc11.equals(d19) && !disc22.equals(d19) && !disc44.equals(d19) && !disc55.equals(d19)){
           disc3_prof.setText(d19);
           asd3=d19;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20)&& !disc11.equals(d20) && !disc22.equals(d20) && !disc44.equals(d20) && !disc55.equals(d20)){
           disc3_prof.setText(d20);
           asd3=d20;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21)&& !disc11.equals(d21) && !disc22.equals(d21) && !disc44.equals(d21) && !disc55.equals(d21)){
           disc3_prof.setText(d21);
           asd3=d21;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22)&& !disc11.equals(d22) && !disc22.equals(d22) && !disc44.equals(d22) && !disc55.equals(d22)){
           disc3_prof.setText(d22);
           asd3=d22;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23)&& !disc11.equals(d23) && !disc22.equals(d23) && !disc44.equals(d23) && !disc55.equals(d23)){
           disc3_prof.setText(d23);
           asd3=d23;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24)&& !disc11.equals(d24) && !disc22.equals(d24) && !disc44.equals(d24) && !disc55.equals(d24)){
           disc3_prof.setText(d24);
           asd3=d24;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25)&& !disc11.equals(d25) && !disc22.equals(d25) && !disc44.equals(d25) && !disc55.equals(d25)){
           disc3_prof.setText(d25);
           asd3=d25;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26)&& !disc11.equals(d26) && !disc22.equals(d26) && !disc44.equals(d26) && !disc55.equals(d26)){
           disc3_prof.setText(d26);
           asd3=d26;
       }
         
         
       else if("".equals(d1) && a==1 && disc33.equals(Porenquanto.getM1ant())){
           disc3_prof.setText("");
}else if("".equals(d2) && b==1 && disc33.equals(Porenquanto.getM2ant())){
           disc3_prof.setText("");    
}else if("".equals(d3) && c==1 && disc33.equals(Porenquanto.getM3ant())){
           disc3_prof.setText("");    
}else if("".equals(d4) && d==1 && disc33.equals(Porenquanto.getM4ant())){
           disc3_prof.setText("");    
}else if("".equals(d5) && e==1 && disc33.equals(Porenquanto.getM5ant())){
           disc3_prof.setText("");    
}else if("".equals(d6) && f==1 && disc33.equals(Porenquanto.getM6ant())){
           disc3_prof.setText("");    
}else if("".equals(d7) && g==1 && disc33.equals(Porenquanto.getM7ant())){
           disc3_prof.setText("");   
}else if("".equals(d8) && h==1 && disc33.equals(Porenquanto.getM8ant())){
           disc3_prof.setText("");    
}else if("".equals(d9) && i==1 && disc33.equals(Porenquanto.getM9ant())){
           disc3_prof.setText("");    
}else if("".equals(d10) && j==1 && disc33.equals(Porenquanto.getM10ant())){
           disc3_prof.setText("");    
}else if("".equals(d11) && k==1 && disc33.equals(Porenquanto.getM11ant())){
           disc3_prof.setText("");    
}else if("".equals(d12) && l==1 && disc33.equals(Porenquanto.getM12ant())){
           disc3_prof.setText("");    
}else if("".equals(d13) && m==1 && disc33.equals(Porenquanto.getM13ant())){
           disc3_prof.setText("");    
}else if("".equals(d14) && n==1 && disc33.equals(Porenquanto.getM14ant())){
           disc3_prof.setText("");    
}else if("".equals(d15) && o==1 && disc33.equals(Porenquanto.getM15ant())){
           disc3_prof.setText("");    
}else if("".equals(d16) && p==1 && disc33.equals(Porenquanto.getM16ant())){
           disc3_prof.setText("");    
}else if("".equals(d17) && q==1 && disc33.equals(Porenquanto.getM17ant())){
           disc3_prof.setText("");    
}else if("".equals(d17) && r==1 && disc33.equals(Porenquanto.getM18ant())){
           disc3_prof.setText("");    
}else if("".equals(d19) && s==1 && disc33.equals(Porenquanto.getM19ant())){
           disc3_prof.setText("");    
}else if("".equals(d20) && t==1 && disc33.equals(Porenquanto.getM20ant())){
           disc3_prof.setText("");    
}else if("".equals(d21) && u==1 && disc33.equals(Porenquanto.getM21ant())){
           disc3_prof.setText("");    
}else if("".equals(d22) && v==1 && disc33.equals(Porenquanto.getM22ant())){
           disc3_prof.setText("");    
}else if("".equals(d23) && w==1 && disc33.equals(Porenquanto.getM23ant())){
           disc3_prof.setText("");    
}else if("".equals(d24) && x==1 && disc33.equals(Porenquanto.getM24ant())){
           disc3_prof.setText("");    
}else if("".equals(d25) && y==1 && disc33.equals(Porenquanto.getM25ant())){
           disc3_prof.setText("");    
}else if("".equals(d26) && z==1 && disc33.equals(Porenquanto.getM26ant())){
           disc3_prof.setText("");    
}
         
    }

    private void disc4() {
        if("".equals(disc44) && !asd.equals(d1) && !asd2.equals(d1) && !asd3.equals(d1) && !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1) && !disc11.equals(d1) && !disc22.equals(d1) && !disc33.equals(d1) && !disc55.equals(d1)){
       disc4_prof.setText(d1);
       asd4=d1;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2) && !asd3.equals(d2)&& !disc11.equals(d2) && !disc22.equals(d2) && !disc33.equals(d2) && !disc55.equals(d2)){
       disc4_prof.setText(d2);
       asd4=d2;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3) && !asd3.equals(d3)&& !disc11.equals(d3) && !disc22.equals(d3) && !disc33.equals(d3) && !disc55.equals(d3)){
       disc4_prof.setText(d3);
       asd4=d3;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4) && !asd3.equals(d4)&& !disc11.equals(d4) && !disc22.equals(d4) && !disc33.equals(d4) && !disc55.equals(d4)){
       disc4_prof.setText(d4);
       asd4=d4;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5) && !asd3.equals(d5)&& !disc11.equals(d5) && !disc22.equals(d5) && !disc33.equals(d5) && !disc55.equals(d5)){
       disc4_prof.setText(d5);
       asd4=d5;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6) && !asd3.equals(d6)&& !disc11.equals(d6) && !disc22.equals(d6) && !disc33.equals(d6) && !disc55.equals(d6)){
       disc4_prof.setText(d6);
       asd4=d6;
        System.out.println(d6);
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7) && !asd3.equals(d7)&& !disc11.equals(d7) && !disc22.equals(d7) && !disc33.equals(d7) && !disc55.equals(d7)){
       disc4_prof.setText(d7);
       asd4=d7;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8) && !asd3.equals(d8)&& !disc11.equals(d8) && !disc22.equals(d8) && !disc33.equals(d8) && !disc55.equals(d8)){
       disc4_prof.setText(d8);
       asd4=d8;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9) && !asd3.equals(d9)&& !disc11.equals(d9) && !disc22.equals(d9) && !disc33.equals(d9) && !disc55.equals(d9)){
       disc4_prof.setText(d9);
       asd4=d9;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10) && !asd3.equals(d10)&& !disc11.equals(d10) && !disc22.equals(d10) && !disc33.equals(d10) && !disc55.equals(d10)){
       disc4_prof.setText(d10);
       asd4=d10;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11) && !asd3.equals(d11)&& !disc11.equals(d11) && !disc22.equals(d11) && !disc33.equals(d11) && !disc55.equals(d11)){
       disc4_prof.setText(d11);
       asd4=d11;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12) && !asd3.equals(d12)&& !disc11.equals(d12) && !disc22.equals(d12) && !disc33.equals(d12) && !disc55.equals(d12)){
       disc4_prof.setText(d12);
       asd4=d12;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13) && !asd3.equals(d13)&& !disc11.equals(d13) && !disc22.equals(d13) && !disc33.equals(d13) && !disc55.equals(d13)){
       disc4_prof.setText(d13);
       asd4=d13;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14) && !asd3.equals(d14)&& !disc11.equals(d14) && !disc22.equals(d14) && !disc33.equals(d14) && !disc55.equals(d14)){
       disc4_prof.setText(d14);
       asd4=d14;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15) && !asd3.equals(d15)&& !disc11.equals(d15) && !disc22.equals(d15) && !disc33.equals(d15) && !disc55.equals(d15)){
       disc4_prof.setText(d15);
       asd4=d15;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16) && !asd3.equals(d16)&& !disc11.equals(d16) && !disc22.equals(d16) && !disc33.equals(d16) && !disc55.equals(d16)){
       disc4_prof.setText(d16);
       asd4=d16;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17) && !asd3.equals(d17)&& !disc11.equals(d17) && !disc22.equals(d17) && !disc33.equals(d17) && !disc55.equals(d17)){
       disc4_prof.setText(d17);
       asd4=d17;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18) && !asd3.equals(d18)&& !disc11.equals(d18) && !disc22.equals(d18) && !disc33.equals(d18) && !disc55.equals(d18)){
       disc4_prof.setText(d18);
       asd4=d18;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19) && !asd3.equals(d19)&& !disc11.equals(d19) && !disc22.equals(d19) && !disc33.equals(d19) && !disc55.equals(d19)){
       disc4_prof.setText(d19);
       asd4=d19;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20) && !asd3.equals(d20)&& !disc11.equals(d20) && !disc22.equals(d20) && !disc33.equals(d20) && !disc55.equals(d20)){
       disc4_prof.setText(d20);
       asd4=d20;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21) && !asd3.equals(d21)&& !disc11.equals(d21) && !disc22.equals(d21) && !disc33.equals(d21) && !disc55.equals(d21)){
       disc4_prof.setText(d21);
       asd4=d21;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22) && !asd3.equals(d22)&& !disc11.equals(d22) && !disc22.equals(d22) && !disc33.equals(d22) && !disc55.equals(d22)){
       disc4_prof.setText(d22);
       asd4=d22;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23) && !asd3.equals(d23)&& !disc11.equals(d23) && !disc22.equals(d23) && !disc33.equals(d23) && !disc55.equals(d23)){
       disc4_prof.setText(d23);
       asd4=d23;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24) && !asd3.equals(d24)&& !disc11.equals(d24) && !disc22.equals(d24) && !disc33.equals(d24) && !disc55.equals(d24)){
       disc4_prof.setText(d24);
       asd4=d24;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25) && !asd3.equals(d25)&& !disc11.equals(d25) && !disc22.equals(d25) && !disc33.equals(d25) && !disc55.equals(d25)){
       disc4_prof.setText(d25);
       asd4=d25;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26) && !asd3.equals(d26)&& !disc11.equals(d26) && !disc22.equals(d26) && !disc33.equals(d26) && !disc55.equals(d26)){
       disc4_prof.setText(d26);
       asd4=d6;
       }
        
        
         else if("".equals(d1) && a==1 && disc44.equals(Porenquanto.getM1ant())){
           disc4_prof.setText("");
}else if("".equals(d2) && b==1 && disc44.equals(Porenquanto.getM2ant())){
           disc4_prof.setText("");    
}else if("".equals(d3) && c==1 && disc44.equals(Porenquanto.getM3ant())){
           disc4_prof.setText("");    
}else if("".equals(d4) && d==1 && disc44.equals(Porenquanto.getM4ant())){
           disc4_prof.setText("");    
}else if("".equals(d5) && e==1 && disc44.equals(Porenquanto.getM5ant())){
           disc4_prof.setText("");    
}else if("".equals(d6) && f==1 && disc44.equals(Porenquanto.getM6ant())){
           disc4_prof.setText("");    
}else if("".equals(d7) && g==1 && disc44.equals(Porenquanto.getM7ant())){
           disc4_prof.setText("");   
}else if("".equals(d8) && h==1 && disc44.equals(Porenquanto.getM8ant())){
           disc4_prof.setText("");    
}else if("".equals(d9) && i==1 && disc44.equals(Porenquanto.getM9ant())){
           disc4_prof.setText("");    
}else if("".equals(d10) && j==1 && disc44.equals(Porenquanto.getM10ant())){
           disc4_prof.setText("");    
}else if("".equals(d11) && k==1 && disc44.equals(Porenquanto.getM11ant())){
           disc4_prof.setText("");    
}else if("".equals(d12) && l==1 && disc44.equals(Porenquanto.getM12ant())){
           disc4_prof.setText("");    
}else if("".equals(d13) && m==1 && disc44.equals(Porenquanto.getM13ant())){
           disc4_prof.setText("");    
}else if("".equals(d14) && n==1 && disc44.equals(Porenquanto.getM14ant())){
           disc4_prof.setText("");    
}else if("".equals(d15) && o==1 && disc44.equals(Porenquanto.getM15ant())){
           disc4_prof.setText("");    
}else if("".equals(d16) && p==1 && disc44.equals(Porenquanto.getM16ant())){
           disc4_prof.setText("");    
}else if("".equals(d17) && q==1 && disc44.equals(Porenquanto.getM17ant())){
           disc4_prof.setText("");    
}else if("".equals(d17) && r==1 && disc44.equals(Porenquanto.getM18ant())){
           disc4_prof.setText("");    
}else if("".equals(d19) && s==1 && disc44.equals(Porenquanto.getM19ant())){
           disc4_prof.setText("");    
}else if("".equals(d20) && t==1 && disc44.equals(Porenquanto.getM20ant())){
           disc4_prof.setText("");    
}else if("".equals(d21) && u==1 && disc44.equals(Porenquanto.getM21ant())){
           disc4_prof.setText("");    
}else if("".equals(d22) && v==1 && disc44.equals(Porenquanto.getM22ant())){
           disc4_prof.setText("");    
}else if("".equals(d23) && w==1 && disc44.equals(Porenquanto.getM23ant())){
           disc4_prof.setText("");    
}else if("".equals(d24) && x==1 && disc44.equals(Porenquanto.getM24ant())){
           disc4_prof.setText("");   
}else if("".equals(d25) && y==1 && disc44.equals(Porenquanto.getM25ant())){
           disc4_prof.setText("");    
}else if("".equals(d26) && z==1 && disc44.equals(Porenquanto.getM26ant())){
           disc4_prof.setText("");    
}
    }
    
    private void disc5() {
        if("".equals(disc55) && !asd.equals(d1) && !asd2.equals(d1) && !asd3.equals(d1) && !asd4.equals(d1) && !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1) && !disc11.equals(d1) && !disc22.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1)){
       disc5_prof.setText(d1);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2) && !asd3.equals(d2) && !asd4.equals(d2) && !disc11.equals(d2) && !disc22.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2)){
       disc5_prof.setText(d2);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3) && !asd3.equals(d3) && !asd4.equals(d3) && !disc11.equals(d3) && !disc22.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3)){
       disc5_prof.setText(d3);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4) && !asd3.equals(d4) && !asd4.equals(d4) && !disc11.equals(d4) && !disc22.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4)){
       disc5_prof.setText(d4);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5) && !asd3.equals(d5) && !asd4.equals(d5) && !disc11.equals(d5) && !disc22.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5)){
       disc5_prof.setText(d5);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6) && !asd3.equals(d6) && !asd4.equals(d6) && !disc11.equals(d6) && !disc22.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6)){
       disc5_prof.setText(d6);
        System.out.println(d6);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7) && !asd3.equals(d7) && !asd4.equals(d7) && !disc11.equals(d7) && !disc22.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7)){
       disc5_prof.setText(d7);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8) && !asd3.equals(d8) && !asd4.equals(d8) && !disc11.equals(d8) && !disc22.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8)){
       disc5_prof.setText(d8);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9) && !asd3.equals(d9) && !asd4.equals(d9) && !disc11.equals(d9) && !disc22.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9)){
       disc5_prof.setText(d9);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10) && !asd3.equals(d10) && !asd4.equals(d10) && !disc11.equals(d10) && !disc22.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10)){
       disc5_prof.setText(d10);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11) && !asd3.equals(d11) && !asd4.equals(d11) && !disc11.equals(d11) && !disc22.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11)){
       disc5_prof.setText(d11);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12) && !asd3.equals(d12) && !asd4.equals(d12) && !disc11.equals(d12) && !disc22.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12)){
       disc5_prof.setText(d12);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13) && !asd3.equals(d13) && !asd4.equals(d13) && !disc11.equals(d13) && !disc22.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13)){
       disc5_prof.setText(d13);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14) && !asd3.equals(d14) && !asd4.equals(d14) && !disc11.equals(d14) && !disc22.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14)){
       disc5_prof.setText(d14);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15) && !asd3.equals(d15) && !asd4.equals(d15) && !disc11.equals(d15) && !disc22.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15)){
       disc5_prof.setText(d15);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16) && !asd3.equals(d16) && !asd4.equals(d16) && !disc11.equals(d16) && !disc22.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16)){
       disc5_prof.setText(d16);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17) && !asd3.equals(d17) && !asd4.equals(d17) && !disc11.equals(d17) && !disc22.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17)){
       disc5_prof.setText(d17);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18) && !asd3.equals(d18) && !asd4.equals(d18) && !disc11.equals(d18) && !disc22.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18)){
       disc5_prof.setText(d18);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19) && !asd3.equals(d19) && !asd4.equals(d19) && !disc11.equals(d19) && !disc22.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19)){
       disc5_prof.setText(d19);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20) && !asd3.equals(d20) && !asd4.equals(d20) && !disc11.equals(d20) && !disc22.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20)){
       disc5_prof.setText(d20);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21) && !asd3.equals(d21) && !asd4.equals(d21) && !disc11.equals(d21) && !disc22.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21)){
       disc5_prof.setText(d21);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22) && !asd3.equals(d22) && !asd4.equals(d22) && !disc11.equals(d22) && !disc22.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22)){
       disc5_prof.setText(d22);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23) && !asd3.equals(d23) && !asd4.equals(d23) && !disc11.equals(d23) && !disc22.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23)){
       disc5_prof.setText(d23);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24) && !asd3.equals(d24) && !asd4.equals(d24) && !disc11.equals(d24) && !disc22.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24)){
       disc5_prof.setText(d24);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25) && !asd3.equals(d25) && !asd4.equals(d25) && !disc11.equals(d25) && !disc22.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25)){
       disc5_prof.setText(d25);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26) && !asd3.equals(d26) && !asd4.equals(d26) && !disc11.equals(d26) && !disc22.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26)){
       disc5_prof.setText(d26);
       }
        
        
         else if("".equals(d1) && a==1 && disc55.equals(Porenquanto.getM1ant())){
           disc5_prof.setText("");
}else if("".equals(d2) && b==1 && disc55.equals(Porenquanto.getM2ant())){
           disc5_prof.setText("");    
}else if("".equals(d3) && c==1 && disc55.equals(Porenquanto.getM3ant())){
           disc5_prof.setText("");    
}else if("".equals(d4) && d==1 && disc55.equals(Porenquanto.getM4ant())){
           disc5_prof.setText("");    
}else if("".equals(d5) && e==1 && disc55.equals(Porenquanto.getM5ant())){
           disc5_prof.setText("");    
}else if("".equals(d6) && f==1 && disc55.equals(Porenquanto.getM6ant())){
           disc5_prof.setText("");    
}else if("".equals(d7) && g==1 && disc55.equals(Porenquanto.getM7ant())){
           disc5_prof.setText("");   
}else if("".equals(d8) && h==1 && disc55.equals(Porenquanto.getM8ant())){
           disc5_prof.setText("");    
}else if("".equals(d9) && i==1 && disc55.equals(Porenquanto.getM9ant())){
           disc5_prof.setText("");    
}else if("".equals(d10) && j==1 && disc55.equals(Porenquanto.getM10ant())){
           disc5_prof.setText("");    
}else if("".equals(d11) && k==1 && disc55.equals(Porenquanto.getM11ant())){
           disc5_prof.setText("");    
}else if("".equals(d12) && l==1 && disc55.equals(Porenquanto.getM12ant())){
           disc5_prof.setText("");    
}else if("".equals(d13) && m==1 && disc55.equals(Porenquanto.getM13ant())){
           disc5_prof.setText("");    
}else if("".equals(d14) && n==1 && disc55.equals(Porenquanto.getM14ant())){
           disc5_prof.setText("");    
}else if("".equals(d15) && o==1 && disc55.equals(Porenquanto.getM15ant())){
           disc5_prof.setText("");    
}else if("".equals(d16) && p==1 && disc55.equals(Porenquanto.getM16ant())){
           disc5_prof.setText("");    
}else if("".equals(d17) && q==1 && disc55.equals(Porenquanto.getM17ant())){
           disc5_prof.setText("");    
}else if("".equals(d17) && r==1 && disc55.equals(Porenquanto.getM18ant())){
           disc5_prof.setText("");    
}else if("".equals(d19) && s==1 && disc55.equals(Porenquanto.getM19ant())){
           disc5_prof.setText("");    
}else if("".equals(d20) && t==1 && disc55.equals(Porenquanto.getM20ant())){
           disc5_prof.setText("");    
}else if("".equals(d21) && u==1 && disc55.equals(Porenquanto.getM21ant())){
           disc5_prof.setText("");    
}else if("".equals(d22) && v==1 && disc55.equals(Porenquanto.getM22ant())){
           disc5_prof.setText("");    
}else if("".equals(d23) && w==1 && disc55.equals(Porenquanto.getM23ant())){
           disc5_prof.setText("");    
}else if("".equals(d24) && x==1 && disc55.equals(Porenquanto.getM24ant())){
           disc5_prof.setText("");   
}else if("".equals(d25) && y==1 && disc55.equals(Porenquanto.getM25ant())){
           disc5_prof.setText("");    
}else if("".equals(d26) && z==1 && disc55.equals(Porenquanto.getM26ant())){
           disc5_prof.setText("");    
}
    }

    private void VerificaSerieTurma () {
        try {
           listaS=seriemet.Buscar("%");
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    for(int ind=0;listaS.size()>ind;ind++){
        serie=listaS.get(ind);
        if( "1".equals(serie.getNome())){
            serie1_prof.setVisible(true);
            serie1_prof.setText("1");
        }
        if("2".equals(serie.getNome())){
             serie2_prof.setVisible(true);
             serie2_prof.setText("2");
        }
        if("3".equals(serie.getNome())){
             serie3_prof.setVisible(true);
             serie3_prof.setText("3");
        }
        if("1".equals(serie.getNome()) && "A".equals(serie.getTurma())){
            serieA1.setVisible(true);
            serieA1.setText("A");
            JLA1.setVisible(true);
            JLA1.setText("X");
           JLA1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "A".equals(serie.getTurma())){
             serieA2.setVisible(true);
            serieA2.setText("A");
            JLA2.setVisible(true);
            JLA2.setText("X");
            JLA2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "A".equals(serie.getTurma())){
            serieA3.setVisible(true);
            serieA3.setText("A");
            JLA3.setVisible(true);
            JLA3.setText("X");
            JLA3.setForeground(Color.WHITE);
        }
        if("1".equals(serie.getNome()) && "B".equals(serie.getTurma())){
            serieB1.setVisible(true);
            serieB1.setText("B");
            JLB1.setVisible(true);
            JLB1.setText("X");
            JLB1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "B".equals(serie.getTurma())){
            serieB2.setVisible(true);
            serieB2.setText("B");
            JLB2.setVisible(true);
            JLB2.setText("X");
            JLB2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "B".equals(serie.getTurma())){
            serieB3.setVisible(true);
            serieB3.setText("B");
            JLB3.setVisible(true);
            JLB3.setText("X");
            JLB3.setForeground(Color.WHITE);
        }
        if("1".equals(serie.getNome()) && "C".equals(serie.getTurma())){
            serieC1.setVisible(true);
            serieC1.setText("C");
            JLC1.setVisible(true);
            JLC1.setText("X");
            JLC1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "C".equals(serie.getTurma())){
            serieC2.setVisible(true);
            serieC2.setText("C");
             JLC2.setVisible(true);
            JLC2.setText("X");
            JLC2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "C".equals(serie.getTurma())){
            serieC3.setVisible(true);
            serieC3.setText("C");
            JLC3.setVisible(true);
            JLC3.setText("X");
            JLC3.setForeground(Color.WHITE);
        }
        if("1".equals(serie.getNome()) && "D".equals(serie.getTurma())){
            serieD1.setVisible(true);
            serieD1.setText("D");
            JLD1.setVisible(true);
            JLD1.setText("X");
            JLD1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "D".equals(serie.getTurma())){
            serieD2.setVisible(true);
            serieD2.setText("D");
            JLD2.setVisible(true);
            JLD2.setText("X");
            JLD2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "D".equals(serie.getTurma())){
            serieD3.setVisible(true);
            serieD3.setText("D");
            JLD3.setVisible(true);
            JLD3.setText("X");
            JLD3.setForeground(Color.WHITE);
        }
        if("1".equals(serie.getNome()) && "E".equals(serie.getTurma())){
            serieE1.setVisible(true);
            serieE1.setText("E");
            JLE1.setVisible(true);
            JLE1.setText("X");
            JLE1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "E".equals(serie.getTurma())){
            serieE2.setVisible(true);
            serieE2.setText("E");
            JLE2.setVisible(true);
            JLE2.setText("X");
            JLE2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "E".equals(serie.getTurma())){
            serieE3.setVisible(true);
            serieE3.setText("E");
            JLE3.setVisible(true);
            JLE3.setText("X");
            JLE3.setForeground(Color.WHITE);
        }
        if("1".equals(serie.getNome()) && "F".equals(serie.getTurma())){
            serieF1.setVisible(true);
            serieF1.setText("F");
            JLF1.setVisible(true);
            JLF1.setText("X");
            JLF1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "F".equals(serie.getTurma())){
            serieF2.setVisible(true);
            serieF2.setText("F");
            JLF2.setVisible(true);
            JLF2.setText("X");
            JLF2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "F".equals(serie.getTurma())){
            serieF3.setVisible(true);
            serieF3.setText("F");
            JLF3.setVisible(true);
            JLF3.setText("X");
            JLF3.setForeground(Color.WHITE);
        }
        if("1".equals(serie.getNome()) && "G".equals(serie.getTurma())){
            serieG1.setVisible(true);
            serieG1.setText("G");
            JLG1.setVisible(true);
            JLG1.setText("X");
            JLG1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "G".equals(serie.getTurma())){
            serieG2.setVisible(true);
            serieG2.setText("G");
            JLG2.setVisible(true);
            JLG2.setText("X");
            JLG2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "G".equals(serie.getTurma())){
            serieG3.setVisible(true);
            serieG3.setText("G");
            JLG3.setVisible(true);
            JLG3.setText("X");
            JLG3.setForeground(Color.WHITE);
        }
        if("1".equals(serie.getNome()) && "H".equals(serie.getTurma())){
            serieH1.setVisible(true);
            serieH1.setText("H");
            JLH1.setVisible(true);
            JLH1.setText("X");
            JLH1.setForeground(Color.WHITE);
        }
        if("2".equals(serie.getNome()) && "H".equals(serie.getTurma())){
            serieH2.setVisible(true);
            serieH2.setText("H");
            JLH2.setVisible(true);
            JLH2.setText("X");
            JLH2.setForeground(Color.WHITE);
        }
        if("3".equals(serie.getNome()) && "H".equals(serie.getTurma())){
            serieH3.setVisible(true);
            serieH3.setText("H");
            JLH3.setVisible(true);
            JLH3.setText("X");
            JLH3.setForeground(Color.WHITE);
        }
        
    }    
        
          }

  public int getId_curso() {
        return id;
    }

    public void setId_curso(int id) {
        FormProfessor.id = id;
    }
    
    public void executaALTDEL(){
     jDialog1.setVisible(false);
escolha=jRB_edt_del_prof.getText();
ChamaEscolha(escolha);
             
       
    }
    
   private  void JTTabelaLinhaSelecionada_prof(JTable tabela)  {
            
        if (jTTabela_Prof_prof.getSelectedRow() > -1) {
             id_deste=Prof.get(tabela.getSelectedRow()).getId(); 
            setId_curso(id_deste);                 
           executaALTDEL();
           jTF_nome_prof.setText(Prof.get(tabela.getSelectedRow()).getNome());
           jTF_Carga_horaria_prof.setText(String.valueOf(Prof.get(tabela.getSelectedRow()).getCarga_horaria()));
           VerificaSerieTurma();
           SerieTurma(id_deste);
           BuscaMaterias(id_deste);
            BuscarDias(id_deste);
            jTTabela_Prof_prof.clearSelection();
            
        } else {
          
        }
        
         
  }

    private void listarProfessor() {
        try {
            Prof = profmet.BuscarNome(JTF_Pesquisar_prof.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisa(Prof);
    }

    private void mostraPesquisa(List<Professor> Prof) {
          while (tmProf_prof.getRowCount() > 0) {
            tmProf_prof.removeRow(0);
        }
        if (Prof.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < Prof.size(); ind++) {
                tmProf_prof.addRow(linhaa);
                tmProf_prof.setValueAt(Prof.get(ind).getNome(), ind, 0);
            }
        }
    }

    private boolean VerificaseaIgual() {
        int esc=0;
        try {
            listaP=profmet.BuscarNome("%");
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        for(int ind=0;listaP.size()>ind;ind++){
            professor= listaP.get(ind);
            if(professor.getNome().equals(jTF_nome_prof.getText())){
               esc=1;
            }
        }
        if(esc==1){
             return false;
        }else{
            return true;
        }
    }

    private boolean VerificaDadosCorretos () {
         if( "".equals(jTF_nome_prof.getText()) || "".equals(jTF_Carga_horaria_prof.getText()) || "X".equals(JLA1.getText()) && "X".equals(JLA2.getText()) && "X".equals(JLA3.getText()) && 
                 "X".equals(JLB1.getText()) && "X".equals(JLB2.getText()) && "X".equals(JLB3.getText()) && "X".equals(JLC1.getText()) && "X".equals(JLC2.getText()) && "X".equals(JLC3.getText()) &&
                 "X".equals(JLD1.getText()) && "X".equals(JLD2.getText()) && "X".equals(JLD3.getText()) && "X".equals(JLE1.getText()) && "X".equals(JLE2.getText()) && "X".equals(JLE3.getText()) &&
                 "X".equals(JLF1.getText()) && "X".equals(JLF2.getText()) && "X".equals(JLF3.getText()) && "X".equals(JLG1.getText()) && "X".equals(JLG2.getText()) && "X".equals(JLG3.getText()) &&
                 "X".equals(JLH1.getText()) && "X".equals(JLH2.getText()) && "X".equals(JLH3.getText()) || "".equals(disc1_prof.getText()) && "".equals(disc2_prof.getText()) && "".equals(disc3_prof.getText()) && "".equals(disc4_prof.getText() ) && "".equals(disc5_prof.getText() )
                 || jTable2.getModel().getValueAt(0,0)=="" && jTable2.getModel().getValueAt(1,0)=="" && jTable2.getModel().getValueAt(2,0)==""  && jTable2.getModel().getValueAt(3,0)==""  && jTable2.getModel().getValueAt(4,0)=="" && jTable2.getModel().getValueAt(5,0)=="" && jTable2.getModel().getValueAt(6,0)=="" && jTable2.getModel().getValueAt(7,0)=="" && jTable2.getModel().getValueAt(8,0)==""  &&
                 jTable2.getModel().getValueAt(0,1)=="" && jTable2.getModel().getValueAt(1,1)=="" && jTable2.getModel().getValueAt(2,1)==""  && jTable2.getModel().getValueAt(3,1)==""  && jTable2.getModel().getValueAt(4,1)=="" && jTable2.getModel().getValueAt(5,1)=="" && jTable2.getModel().getValueAt(6,1)=="" && jTable2.getModel().getValueAt(7,1)=="" && jTable2.getModel().getValueAt(8,1)==""  && 
                 jTable2.getModel().getValueAt(0,2)=="" && jTable2.getModel().getValueAt(1,2)=="" && jTable2.getModel().getValueAt(2,2)==""  && jTable2.getModel().getValueAt(3,2)==""  && jTable2.getModel().getValueAt(4,2)=="" && jTable2.getModel().getValueAt(5,2)=="" && jTable2.getModel().getValueAt(6,2)=="" && jTable2.getModel().getValueAt(7,2)=="" && jTable2.getModel().getValueAt(8,2)==""  &&
                 jTable2.getModel().getValueAt(0,3)=="" && jTable2.getModel().getValueAt(1,3)=="" && jTable2.getModel().getValueAt(2,3)==""  && jTable2.getModel().getValueAt(3,3)==""  && jTable2.getModel().getValueAt(4,3)=="" && jTable2.getModel().getValueAt(5,3)=="" && jTable2.getModel().getValueAt(6,3)=="" && jTable2.getModel().getValueAt(7,3)=="" && jTable2.getModel().getValueAt(8,3)==""  &&
                 jTable2.getModel().getValueAt(0,4)=="" && jTable2.getModel().getValueAt(1,4)=="" && jTable2.getModel().getValueAt(2,4)==""  && jTable2.getModel().getValueAt(3,4)==""  && jTable2.getModel().getValueAt(4,4)=="" && jTable2.getModel().getValueAt(5,4)=="" && jTable2.getModel().getValueAt(6,4)=="" && jTable2.getModel().getValueAt(7,4)=="" && jTable2.getModel().getValueAt(8,4)=="" ) {
            return false;
        }else {
            return true;
        }
    }
    
    private boolean VerificaDadosCorretosALTDEL() {
         if( "".equals(jTF_nome_prof.getText()) || "".equals(jTF_Carga_horaria_prof.getText()) || "X".equals(JLA1.getText()) && "X".equals(JLA2.getText()) && "X".equals(JLA3.getText()) && 
                 "X".equals(JLB1.getText()) && "X".equals(JLB2.getText()) && "X".equals(JLB3.getText()) && "X".equals(JLC1.getText()) && "X".equals(JLC2.getText()) && "X".equals(JLC3.getText()) &&
                 "X".equals(JLD1.getText()) && "X".equals(JLD2.getText()) && "X".equals(JLD3.getText()) && "X".equals(JLE1.getText()) && "X".equals(JLE2.getText()) && "X".equals(JLE3.getText()) &&
                 "X".equals(JLF1.getText()) && "X".equals(JLF2.getText()) && "X".equals(JLF3.getText()) && "X".equals(JLG1.getText()) && "X".equals(JLG2.getText()) && "X".equals(JLG3.getText()) &&
                 "X".equals(JLH1.getText()) && "X".equals(JLH2.getText()) && "X".equals(JLH3.getText()) || "Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText()) && "Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText()) && "Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText()) && "Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())
                 || jTable2.getModel().getValueAt(0,0)=="" && jTable2.getModel().getValueAt(1,0)=="" && jTable2.getModel().getValueAt(2,0)==""  && jTable2.getModel().getValueAt(3,0)==""  && jTable2.getModel().getValueAt(4,0)=="" && jTable2.getModel().getValueAt(5,0)=="" && jTable2.getModel().getValueAt(6,0)=="" && jTable2.getModel().getValueAt(7,0)=="" && jTable2.getModel().getValueAt(8,0)=="" &&
                 jTable2.getModel().getValueAt(0,1)=="" && jTable2.getModel().getValueAt(1,1)=="" && jTable2.getModel().getValueAt(2,1)==""  && jTable2.getModel().getValueAt(3,1)==""  && jTable2.getModel().getValueAt(4,1)=="" && jTable2.getModel().getValueAt(5,1)=="" && jTable2.getModel().getValueAt(6,1)=="" && jTable2.getModel().getValueAt(7,1)=="" && jTable2.getModel().getValueAt(8,1)==""  && 
                 jTable2.getModel().getValueAt(0,2)=="" && jTable2.getModel().getValueAt(1,2)=="" && jTable2.getModel().getValueAt(2,2)==""  && jTable2.getModel().getValueAt(3,2)==""  && jTable2.getModel().getValueAt(4,2)=="" && jTable2.getModel().getValueAt(5,2)=="" && jTable2.getModel().getValueAt(6,2)=="" && jTable2.getModel().getValueAt(7,2)=="" && jTable2.getModel().getValueAt(8,2)==""  &&
                 jTable2.getModel().getValueAt(0,3)=="" && jTable2.getModel().getValueAt(1,3)=="" && jTable2.getModel().getValueAt(2,3)==""  && jTable2.getModel().getValueAt(3,3)==""  && jTable2.getModel().getValueAt(4,3)=="" && jTable2.getModel().getValueAt(5,3)=="" && jTable2.getModel().getValueAt(6,3)=="" && jTable2.getModel().getValueAt(7,3)=="" && jTable2.getModel().getValueAt(8,3)==""  &&
                 jTable2.getModel().getValueAt(0,4)=="" && jTable2.getModel().getValueAt(1,4)=="" && jTable2.getModel().getValueAt(2,4)==""  && jTable2.getModel().getValueAt(3,4)==""  && jTable2.getModel().getValueAt(4,4)=="" && jTable2.getModel().getValueAt(5,4)=="" && jTable2.getModel().getValueAt(6,4)=="" && jTable2.getModel().getValueAt(7,4)=="" && jTable2.getModel().getValueAt(8,4)=="" ) {
            return false;
        }else {
            return true;
        }
    }

    private void CadatrarProfessor () {
        professor.setNome(jTF_nome_prof.getText());
        professor.setCarga_horaria(Integer.parseInt(jTF_Carga_horaria_prof.getText()));
        profmet.Adiciona(professor);
        int id_prof=profmet.BuscaId(professor);
        if(!"".equals(disc1_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc1_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc2_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc2_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc3_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc3_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc4_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc4_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc5_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc5_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if("V".equals(JLA1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","A");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","A");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","A");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","B");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","B");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","B");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","C");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","C");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","C");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","D");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","D");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","D");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","E");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","E");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","E");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","F");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","F");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","F");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","G");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","G");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","G");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","H");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }if("V".equals(JLH2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","H");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","H");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        
        
        
        
        
        if(jTable2.getModel().getValueAt(0,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(6,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        
    }

    private void limpaDadosADD() {
        Porenquanto.setM1("");
        Porenquanto.setM2("");
        Porenquanto.setM3("");
        Porenquanto.setM4("");
        Porenquanto.setM5("");
        Porenquanto.setM6("");
        Porenquanto.setM7("");
        Porenquanto.setM8("");
        Porenquanto.setM9("");
        Porenquanto.setM10("");
        Porenquanto.setM11("");
        Porenquanto.setM12("");
        Porenquanto.setM13("");
        Porenquanto.setM14("");
        Porenquanto.setM15("");
        Porenquanto.setM16("");
        Porenquanto.setM17("");
        Porenquanto.setM18("");
        Porenquanto.setM19("");
        Porenquanto.setM20("");
        Porenquanto.setM21("");
        Porenquanto.setM22("");
        Porenquanto.setM23("");
        Porenquanto.setM24("");
        Porenquanto.setM25("");
        Porenquanto.setM26("");
        disc1_prof.setText("");
        disc2_prof.setText("");
        disc3_prof.setText("");
        disc4_prof.setText("");
        disc5_prof.setText("");
        jTF_nome_prof.setText("");
        jTF_Carga_horaria_prof.setText("");
        desmarcarMouseClicked(null);
        VerificaSerieTurma();
        jRB_profissional_prof.setSelected(false);
        jRB_regular_prof.setSelected(false);
    }

    private void SerieTurma(int id_deste) {
        try {
            listaS=profserieturmamet.BuscarSerieProfessor(id_deste);
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        String[] ano,turma;
        ano=new String[listaS.size()];
        turma=new String[listaS.size()];
        
        for(int ind=0;listaS.size()>ind;ind++){
            serie = listaS.get(ind);
            ano[ind]=serie.getNome();
            turma[ind]=serie.getTurma();
            
            if("1".equals(ano[ind]) && "A".equals(turma[ind])){
                JLA1.setText("V");
                JLA1.setForeground(Color.orange);
               
            }
            if("1".equals(ano[ind]) && "B".equals(turma[ind])){
               JLB1.setText("V");
                JLB1.setForeground(Color.orange);
            }
            if("1".equals(ano[ind]) && "C".equals(turma[ind])){
                JLC1.setText("V");
                JLC1.setForeground(Color.orange);
            }
            if("1".equals(ano[ind]) && "D".equals(turma[ind])){
                JLD1.setText("V");
                JLD1.setForeground(Color.orange);
            }
            if("1".equals(ano[ind]) && "E".equals(turma[ind])){
                JLE1.setText("V");
                JLE1.setForeground(Color.orange);

            }
            if("1".equals(ano[ind]) && "F".equals(turma[ind])){
                JLF1.setText("V");
                JLF1.setForeground(Color.orange);
            }
            if("1".equals(ano[ind]) && "G".equals(turma[ind])){
                JLG1.setText("V");
                JLG1.setForeground(Color.orange);
            }
            if("1".equals(ano[ind]) && "H".equals(turma[ind])){
                JLH1.setText("V");
                JLH1.setForeground(Color.orange);
            }
            if("2".equals(ano[ind]) && "A".equals(turma[ind])){
               JLA2.setText("V");
               JLA2.setForeground(Color.orange);
   
            }
            if("2".equals(ano[ind]) && "B".equals(turma[ind])){
               JLB2.setText("V");
               JLB2.setForeground(Color.orange);
            }
            if("2".equals(ano[ind]) && "C".equals(turma[ind])){
               JLC2.setText("V");
               JLC2.setForeground(Color.orange);
            }
            if("2".equals(ano[ind]) && "D".equals(turma[ind])){
               JLD2.setText("V");
               JLD2.setForeground(Color.orange);
            }
            if("2".equals(ano[ind]) && "E".equals(turma[ind])){
               JLE2.setText("V");
               JLE2.setForeground(Color.orange);
            }
            if("2".equals(ano[ind]) && "F".equals(turma[ind])){
              JLF2.setText("V");
               JLF2.setForeground(Color.orange);
            }
             if("2".equals(ano[ind]) && "G".equals(turma[ind])){
               JLG2.setText("V");
               JLG2.setForeground(Color.orange);
            }
              if("2".equals(ano[ind]) && "H".equals(turma[ind])){
                JLH2.setText("V");
               JLH2.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "A".equals(turma[ind])){
              JLA3.setText("V");
              JLA3.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "B".equals(turma[ind])){
               JLB3.setText("V");
              JLB3.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "C".equals(turma[ind])){
              JLC3.setText("V");
              JLC3.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "D".equals(turma[ind])){
               JLD3.setText("V");
              JLD3.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "E".equals(turma[ind])){
               JLE3.setText("V");
              JLE3.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "F".equals(turma[ind])){
              JLF3.setText("V");
              JLF3.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "G".equals(turma[ind])){
             JLG3.setText("V");
              JLG3.setForeground(Color.orange);
            }
            if("3".equals(ano[ind]) && "H".equals(turma[ind])){
              JLH3.setText("V");
              JLH3.setForeground(Color.orange);
            }
        }
    }

    private void BuscaMaterias(int id_deste) {
       listaD=profdiscmet.BuscaDiscProf(id_deste);
       List<Disciplina> DiscEixo=profdiscmet.BuscaNomeDisciEixo(id_deste);
       String[] nome_eixo=new String[DiscEixo.size()];
       String[] nome_disciplinas= new String[listaD.size()];
        for(int ind=0;listaD.size()>ind;ind++){
            disciplina = listaD.get(ind);
            nome_disciplinas[ind]=disciplina.getNome();
            System.out.println("materia "+nome_disciplinas[ind]); 
            
            if("Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())&& !disc2_prof.getText().equals(nome_disciplinas[ind])&& !disc3_prof.getText().equals(nome_disciplinas[ind])&& !disc4_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc1_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText()) && !disc1_prof.getText().equals(nome_disciplinas[ind])&& !disc3_prof.getText().equals(nome_disciplinas[ind]) && !disc4_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc2_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())&& !disc1_prof.getText().equals(nome_disciplinas[ind]) && !disc2_prof.getText().equals(nome_disciplinas[ind])&& !disc4_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc3_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())&& !disc1_prof.getText().equals(nome_disciplinas[ind]) && !disc2_prof.getText().equals(nome_disciplinas[ind]) && !disc3_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc4_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())&& !disc1_prof.getText().equals(nome_disciplinas[ind]) && !disc2_prof.getText().equals(nome_disciplinas[ind]) && !disc3_prof.getText().equals(nome_disciplinas[ind])&& !disc4_prof.getText().equals(nome_disciplinas[ind])){
            disc5_prof.setText(nome_disciplinas[ind]);
            }
            
        }
        for(int ind=0;DiscEixo.size()>ind;ind++){
            disciplina = DiscEixo.get(ind);
            nome_eixo[ind]=disciplina.getEixo();
            System.out.println("eixo "+nome_eixo[ind]); 
            
            if("".equals(EixoR_prof.getText()) && "Regular".equals(nome_eixo[ind])){
            EixoR_prof.setText(nome_eixo[ind]);
            } if("".equals(EixoP_prof.getText()) && "Profissional".equals(nome_eixo[ind])){
            EixoP_prof.setText(nome_eixo[ind]);
            }
            
        }
        if(listaD.isEmpty()){
               disc1_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc2_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc3_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc4_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc5_prof.setText("Clique aqui para adicionar uma disciplina"); 
            }
        if(DiscEixo.isEmpty()){
               EixoP_prof.setText(""); 
               EixoR_prof.setText(""); 
               
            }
    }

    
    private void BuscarDias(int id_deste) {
        try {
            listaPD=profdiasmet.BuscaProfDias(id_deste);
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        int[] aulas=new int[listaPD.size()];
       int[] dias=new int[listaPD.size()];
        
        for(int ind=0;listaPD.size()>ind;ind++){
            profdias = listaPD.get(ind);
            dias[ind]=profdias.getId_dias();
            aulas[ind]=profdias.getId_aula();
            if(dias[ind]==1 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,0); 
            }
            if(dias[ind]==1 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,0); 
            }
            if(dias[ind]==1 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,0); 
            }
            if(dias[ind]==1 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,0); 
            }
            if(dias[ind]==1 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,0); 
            }
            if(dias[ind]==1 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,0); 
            }
            if(dias[ind]==1 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,0); 
            }
            if(dias[ind]==1 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,0); 
            }
            
            if(dias[ind]==1 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,0); 
            }
            if(dias[ind]==2 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,1); 
            }
            if(dias[ind]==2 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,1); 
            }
            if(dias[ind]==2 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,1); 
            }
            if(dias[ind]==2 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,1); 
            }
            if(dias[ind]==2 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,1); 
            }
            if(dias[ind]==2 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,1); 
            }
            if(dias[ind]==2 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,1); 
            }
            if(dias[ind]==2 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,1); 
            }
            
            if(dias[ind]==2 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,1); 
            }
            if(dias[ind]==3 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,2); 
            }
            if(dias[ind]==3 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,2); 
            }
            if(dias[ind]==3 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,2); 
            }
            if(dias[ind]==3 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,2); 
            }
            if(dias[ind]==3 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,2); 
            }
            if(dias[ind]==3 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,2); 
            }
            if(dias[ind]==3 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,2); 
            }
            if(dias[ind]==3 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,2); 
            }
            
             if(dias[ind]==3 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,2); 
            }
            if(dias[ind]==4 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,3); 
            }
            if(dias[ind]==4 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,3); 
            }
            if(dias[ind]==4 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,3); 
            }
            if(dias[ind]==4 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,3); 
            }
            if(dias[ind]==4 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,3); 
            }
            if(dias[ind]==4 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,3); 
            }
            if(dias[ind]==4 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,3); 
            }
            if(dias[ind]==4 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,3); 
            }
            
            if(dias[ind]==4 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,3); 
            }
            if(dias[ind]==5 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,4); 
            }
            if(dias[ind]==5 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,4); 
            }
            if(dias[ind]==5 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,4); 
            }
            if(dias[ind]==5 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,4); 
            }
            if(dias[ind]==5 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,4); 
            }
            if(dias[ind]==5 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,4); 
            }
            if(dias[ind]==5 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,4); 
            }
            if(dias[ind]==5 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,4); 
            }
            
            if(dias[ind]==5 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,4); 
            }
        }
        if(listaPD.isEmpty()){
        jTable2.getModel().setValueAt("", 0,0);
        jTable2.getModel().setValueAt("", 1,0);
        jTable2.getModel().setValueAt("", 2,0);
        jTable2.getModel().setValueAt("", 3,0);
        jTable2.getModel().setValueAt("", 4,0);
        jTable2.getModel().setValueAt("", 5,0);
        jTable2.getModel().setValueAt("", 6,0);
        jTable2.getModel().setValueAt("", 7,0);
        jTable2.getModel().setValueAt("", 8,0);
        
        jTable2.getModel().setValueAt("", 0,1);
        jTable2.getModel().setValueAt("", 1,1);
        jTable2.getModel().setValueAt("", 2,1);
        jTable2.getModel().setValueAt("", 3,1);
        jTable2.getModel().setValueAt("", 4,1);
        jTable2.getModel().setValueAt("", 5,1);
        jTable2.getModel().setValueAt("", 6,1);
        jTable2.getModel().setValueAt("", 7,1);
        jTable2.getModel().setValueAt("", 8,1);
        
        jTable2.getModel().setValueAt("", 0,2);
        jTable2.getModel().setValueAt("", 1,2);
        jTable2.getModel().setValueAt("", 2,2);
        jTable2.getModel().setValueAt("", 3,2);
        jTable2.getModel().setValueAt("", 4,2);
        jTable2.getModel().setValueAt("", 5,2);
        jTable2.getModel().setValueAt("", 6,2);
        jTable2.getModel().setValueAt("", 7,2);
        jTable2.getModel().setValueAt("", 8,2);
        
        jTable2.getModel().setValueAt("", 0,3);
        jTable2.getModel().setValueAt("", 1,3);
        jTable2.getModel().setValueAt("", 2,3);
        jTable2.getModel().setValueAt("", 3,3);
        jTable2.getModel().setValueAt("", 4,3);
        jTable2.getModel().setValueAt("", 5,3);
        jTable2.getModel().setValueAt("", 6,3);
        jTable2.getModel().setValueAt("", 7,3);
        jTable2.getModel().setValueAt("", 8,3);
        
        jTable2.getModel().setValueAt("", 0,4);
        jTable2.getModel().setValueAt("", 1,4);
        jTable2.getModel().setValueAt("", 2,4);
        jTable2.getModel().setValueAt("", 3,4);
        jTable2.getModel().setValueAt("", 4,4);
        jTable2.getModel().setValueAt("", 5,4);
        jTable2.getModel().setValueAt("", 6,4);
        jTable2.getModel().setValueAt("", 7,4);
        jTable2.getModel().setValueAt("", 8,4);
        
        }
    }

    
    private void limpaDadosALTDEL() {
        jTF_nome_prof.setText("");
        jTF_Carga_horaria_prof.setText("");
        EixoR_prof.setText("");
        EixoP_prof.setText("");
        disc1_prof.setText("");
        disc2_prof.setText("");
        disc3_prof.setText("");
        disc4_prof.setText("");
        disc5_prof.setText("");
        JLA1.setText("X");
        JLA1.setForeground(Color.white);
        JLA2.setText("X");
        JLA2.setForeground(Color.white);
        JLA3.setText("X");
        JLA3.setForeground(Color.white);
        JLB1.setText("X");
        JLB1.setForeground(Color.white);
        JLB2.setText("X");
        JLB2.setForeground(Color.white);
        JLB3.setText("X");
        JLB3.setForeground(Color.white);
        JLC1.setText("X");
        JLC1.setForeground(Color.white);
        JLC2.setText("X");
        JLC2.setForeground(Color.white);
        JLC3.setText("X");
        JLC3.setForeground(Color.white);
        JLD1.setText("X");
        JLD1.setForeground(Color.white);
        JLD2.setText("X");
        JLD2.setForeground(Color.white);
        JLD3.setText("X");
        JLD3.setForeground(Color.white);
        JLE1.setText("X");
        JLE1.setForeground(Color.white);
        JLE2.setText("X");
        JLE2.setForeground(Color.white);
        JLE3.setText("X");
        JLE3.setForeground(Color.white);
        JLF1.setText("X");
        JLF1.setForeground(Color.white);
        JLF2.setText("X");
        JLF2.setForeground(Color.white);
        JLF3.setText("X");
        JLF3.setForeground(Color.white);
        JLG1.setText("X");
        JLG1.setForeground(Color.white);
        JLG2.setText("X");
        JLG2.setForeground(Color.white);
        JLG3.setText("X");
        JLG3.setForeground(Color.white);
        JLH1.setText("X");
        JLH1.setForeground(Color.white);
        JLH2.setText("X");
        JLH2.setForeground(Color.white);
        JLH3.setText("X");
        JLH3.setForeground(Color.white);
        desmarcarMouseClicked(null);
       
    }

    private void AlterarProfessor(int id_deste) {
         int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente alterar este professor?",
                "Confirmação", JOptionPane.YES_NO_OPTION);

        if (resp == JOptionPane.YES_NO_OPTION) {
            Professor prof=new Professor();
            ProfessorMet dao=new ProfessorMet();
            prof.setId(id_deste);
            prof.setNome(jTF_nome_prof.getText());
            prof.setCarga_horaria(Integer.parseInt(jTF_Carga_horaria_prof.getText()));
            dao.alterarProf(prof);
            System.out.println("o id do prof é"+id_deste);
            System.out.println("ate aki BLZ");
            ProfessorDiasMet diamet=new ProfessorDiasMet();
            diamet.Deleta(id_deste);
            ChamaAdicionarDias(id_deste);
            System.out.println("ate aki belez tambem");
            profserieturmamet.Deletar(id_deste);
            ChamaAdicionarSerie(id_deste);
            System.out.println("aki tambem ta blz");
            profdiscmet.Deletar(id_deste);
            ChamaAdicionaDisc(id_deste);
            JOptionPane.showMessageDialog(null, "Alterado com sucesso");
         limpaDadosALTDEL();
         DesabilitaALTDEL();
         DesabilitaADD();
         listarProfessor();
         jDialog1.setVisible(true);


        }
    }

    private void ChamaAdicionarDias(int id_prof) {
      if(jTable2.getModel().getValueAt(0,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
                System.out.println("adicionou");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
       
        if(jTable2.getModel().getValueAt(0,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(0,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(0,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(0,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }

    private void ChamaAdicionarSerie(int id_prof) {
       if("V".equals(JLA1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","A");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","A");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","A");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","B");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","B");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","B");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","C");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","C");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","C");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","D");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","D");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","D");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","E");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","E");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","E");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","F");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","F");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","F");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","G");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","G");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","G");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","H");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }if("V".equals(JLH2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","H");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","H");
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        
        
    }

    private void ChamaAdicionaDisc(int id_prof) {
        if(!"Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc1_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc2_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc3_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc4_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc5_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
    }
    
     private void JTTabelaLinhaSelecionada2_prof (JTable tabela) {
        if (jTTabela_Disc_prof.getSelectedRow() > -1) {
            if(qwe==1){
            disc1_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
            
            }
            if(qwe==2){
            disc2_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
           
            }
            if(qwe==3){
            disc3_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
                      }
            if(qwe==4){
            disc4_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
           
            }
            if(qwe==5){
            disc5_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
           
            }
            jTTabela_Disc_prof.clearSelection();
            jDialog2.setVisible(false);
            
        } else {
            
        }
        
         
  }
     
      private void AbilitaBuscarMaterias() {
        try {
            listaD= discmet.BuscarDisciplinas(JTF_Pesquisarmaterias_prof.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisaMaterias(listaD);
       
    }

    private void mostraPesquisaMaterias(List<Disciplina> listaD) {
        while (tmDisc_prof.getRowCount() > 0) {
            tmDisc_prof.removeRow(0);
        }
        if (listaD.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < listaD.size(); ind++) {
                tmDisc_prof.addRow(linhaa);
                tmDisc_prof.setValueAt(listaD.get(ind).getNome(), ind, 0);
                 
            }
          
        }
    }

    private void AbilitaBuscarDiscCurso() {
        try {
            listaD= discmet.BuscaTodasDiscProf(JTF_Pesquisarmaterias1_prof.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisaMaterias1(listaD);
    }

    private void mostraPesquisaMaterias1(List<Disciplina> listaD) {
         while (tmDisc_prof.getRowCount() > 0) {
            tmDisc_prof.removeRow(0);
        }
        if (listaD.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < listaD.size(); ind++) {
                tmDisc_prof.addRow(linhaa);
                tmDisc_prof.setValueAt(listaD.get(ind).getNome(), ind, 0);
                 
            }
          
        }
    }
    
     private void JTTabelaLinhaSelecionada3_prof (JTable tabela) {
         asdd=0;
         
         if (jTTabela_Disc1_prof.getSelectedRow() > -1) {
            if("".equals(disc1_prof.getText())  && asdd==0){
            disc1_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
            
            }
            if("".equals(disc2_prof.getText())  && !"".equals(disc1_prof.getText())  && asdd==0){
            disc2_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            if("".equals(disc3_prof.getText())  && !"".equals(disc1_prof.getText())  && !"".equals(disc2_prof.getText())  && asdd==0){
            disc3_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
                      }
            if("".equals(disc4_prof.getText()) && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText())  && !"".equals(disc3_prof.getText())  && asdd==0){
            disc4_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
           asdd=1;
            
           
            }
            if("".equals(disc5_prof.getText())  && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText()) && !"".equals(disc3_prof.getText())  && !"".equals(disc4_prof.getText())   && asdd==0){
            disc5_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            jTTabela_Disc1_prof.clearSelection();
            
        } else {
            
        }
        
         
  }
      private void AbilitaBuscarDiscReg() {
        try {
            listaDR= discmet.BuscaTodasDiscProfReg(JTF_Pesquisarmaterias1_prof_reg.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(FormProfessor.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisaMateriasReg(listaDR);
    }
      private void mostraPesquisaMateriasReg(List<Disciplina> listaDR) {
         while (tmDisc_prof_reg.getRowCount() > 0) {
            tmDisc_prof_reg.removeRow(0);
        }
        if (listaDR.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < listaDR.size(); ind++) {
                tmDisc_prof_reg.addRow(linhaa);
                tmDisc_prof_reg.setValueAt(listaDR.get(ind).getNome(), ind, 0);
                 
            }
          
        }
    }
      private void JTTabelaLinhaSelecionada3_prof_reg (JTable tabela) {
         asdd=0;
         
         if (jTTabela_Disc1_prof_reg.getSelectedRow() > -1) {
            if("".equals(disc1_prof.getText())  && asdd==0){
            disc1_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
            
            }
            if("".equals(disc2_prof.getText())  && !"".equals(disc1_prof.getText())  && asdd==0){
            disc2_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            if("".equals(disc3_prof.getText())  && !"".equals(disc1_prof.getText())  && !"".equals(disc2_prof.getText())  && asdd==0){
            disc3_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
                      }
            if("".equals(disc4_prof.getText()) && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText())  && !"".equals(disc3_prof.getText())  && asdd==0){
            disc4_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
           asdd=1;
            
           
            }
            if("".equals(disc5_prof.getText())  && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText()) && !"".equals(disc3_prof.getText())  && !"".equals(disc4_prof.getText())   && asdd==0){
            disc5_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            jTTabela_Disc1_prof_reg.clearSelection();
            
        } else {
            
        }
        
         
  } 
}
